{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "70e6e79d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import jieba\n",
    "import pandas as pd \n",
    "import requests\n",
    "import re\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "from collections import Counter\n",
    "from bs4 import BeautifulSoup\n",
    "from pyecharts.charts import Line,Pie,Scatter,Bar,Map,Grid\n",
    "from pyecharts.charts import WordCloud\n",
    "from pyecharts import options as opts\n",
    "from pyecharts.globals import ThemeType\n",
    "from pyecharts.globals import SymbolType\n",
    "from pyecharts.commons.utils import JsCode\n",
    "from pyecharts.charts import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "d0890539",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>城市</th>\n",
       "      <th>名称</th>\n",
       "      <th>星级</th>\n",
       "      <th>评分</th>\n",
       "      <th>价格</th>\n",
       "      <th>销量</th>\n",
       "      <th>省/市/区</th>\n",
       "      <th>坐标</th>\n",
       "      <th>简介</th>\n",
       "      <th>是否免费</th>\n",
       "      <th>具体地址</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>上海</td>\n",
       "      <td>上海迪士尼乐园</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>325.0</td>\n",
       "      <td>19459</td>\n",
       "      <td>上海·上海·浦东新区</td>\n",
       "      <td>121.667917,31.149712</td>\n",
       "      <td>每个女孩都有一场迪士尼梦</td>\n",
       "      <td>False</td>\n",
       "      <td>上海市浦东新区川沙镇黄赵路310号上海迪士尼乐园</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>上海</td>\n",
       "      <td>上海海昌海洋公园</td>\n",
       "      <td>4A</td>\n",
       "      <td>0.0</td>\n",
       "      <td>276.5</td>\n",
       "      <td>19406</td>\n",
       "      <td>上海·上海·浦东新区</td>\n",
       "      <td>121.915647,30.917713</td>\n",
       "      <td>看珍稀海洋生物 | 玩超刺激娱乐项目</td>\n",
       "      <td>False</td>\n",
       "      <td>上海市浦东新区南汇城银飞路166号</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>上海</td>\n",
       "      <td>上海野生动物园</td>\n",
       "      <td>5A</td>\n",
       "      <td>3.6</td>\n",
       "      <td>116.0</td>\n",
       "      <td>6764</td>\n",
       "      <td>上海·上海·浦东新区</td>\n",
       "      <td>121.728112,31.059636</td>\n",
       "      <td>全球动物聚集地 | 零距离和动物做朋友</td>\n",
       "      <td>False</td>\n",
       "      <td>上海市浦东新区南六公路178号</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>上海</td>\n",
       "      <td>东方绿舟</td>\n",
       "      <td>4A</td>\n",
       "      <td>3.5</td>\n",
       "      <td>40.0</td>\n",
       "      <td>5353</td>\n",
       "      <td>上海·上海·青浦区</td>\n",
       "      <td>121.015977,31.107866</td>\n",
       "      <td>全国首屈一指的青少年校外教育营地</td>\n",
       "      <td>False</td>\n",
       "      <td>上海市青浦区沪青平公路6888号</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>上海</td>\n",
       "      <td>东方明珠</td>\n",
       "      <td>5A</td>\n",
       "      <td>3.8</td>\n",
       "      <td>54.0</td>\n",
       "      <td>3966</td>\n",
       "      <td>上海·上海·浦东新区</td>\n",
       "      <td>121.50626,31.245369</td>\n",
       "      <td>感受云端漫步，品味老上海风情</td>\n",
       "      <td>False</td>\n",
       "      <td>上海市浦东新区世纪大道1号</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   城市        名称   星级   评分     价格     销量       省/市/区                    坐标  \\\n",
       "0  上海   上海迪士尼乐园  NaN  0.0  325.0  19459  上海·上海·浦东新区  121.667917,31.149712   \n",
       "1  上海  上海海昌海洋公园   4A  0.0  276.5  19406  上海·上海·浦东新区  121.915647,30.917713   \n",
       "2  上海   上海野生动物园   5A  3.6  116.0   6764  上海·上海·浦东新区  121.728112,31.059636   \n",
       "3  上海      东方绿舟   4A  3.5   40.0   5353   上海·上海·青浦区  121.015977,31.107866   \n",
       "4  上海      东方明珠   5A  3.8   54.0   3966  上海·上海·浦东新区   121.50626,31.245369   \n",
       "\n",
       "                    简介   是否免费                      具体地址  \n",
       "0         每个女孩都有一场迪士尼梦  False  上海市浦东新区川沙镇黄赵路310号上海迪士尼乐园  \n",
       "1   看珍稀海洋生物 | 玩超刺激娱乐项目  False         上海市浦东新区南汇城银飞路166号  \n",
       "2  全球动物聚集地 | 零距离和动物做朋友  False           上海市浦东新区南六公路178号  \n",
       "3     全国首屈一指的青少年校外教育营地  False          上海市青浦区沪青平公路6888号  \n",
       "4       感受云端漫步，品味老上海风情  False             上海市浦东新区世纪大道1号  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_excel(r'C:\\Users\\admin\\Desktop\\旅游景点.xlsx')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5798ea2e",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = df[df['销量']!=0] "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "673ec0c7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "城市        0\n",
       "名称        0\n",
       "星级        0\n",
       "评分        0\n",
       "价格        0\n",
       "销量        0\n",
       "省/市/区     0\n",
       "坐标        0\n",
       "简介       37\n",
       "是否免费      0\n",
       "具体地址      2\n",
       "dtype: int64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['星级'].fillna('未知', inplace=True)\n",
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ce193a18",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "城市       0\n",
       "名称       0\n",
       "星级       0\n",
       "评分       0\n",
       "价格       0\n",
       "销量       0\n",
       "省/市/区    0\n",
       "坐标       0\n",
       "简介       0\n",
       "是否免费     0\n",
       "具体地址     0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.fillna('未知', inplace=True)\n",
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "568d08ea",
   "metadata": {},
   "outputs": [],
   "source": [
    "def xiaoliang20():\n",
    "    color_js = \"\"\"new echarts.graphic.LinearGradient(0, 0, 1, 0,\n",
    "    [{offset: 0, color: '#FF4500'}, {offset: 1, color: '#98F898'}], false)\"\"\"\n",
    "    sort_info = df.sort_values(by='销量', ascending=True)\n",
    "    b1 = (\n",
    "    Bar()\n",
    "    .add_xaxis(list(sort_info['名称'])[-20:])\n",
    "    .add_yaxis('热门景点销量', sort_info['销量'].values.tolist()[-20:],itemstyle_opts=opts.ItemStyleOpts(color=JsCode(color_js)))\n",
    "    .reversal_axis()\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title='热门景点销量数据'),\n",
    "        yaxis_opts=opts.AxisOpts(name='景点名称'),\n",
    "        xaxis_opts=opts.AxisOpts(name='销量'),\n",
    "        )\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(position=\"right\"))\n",
    "    )\n",
    "    # 将图形整体右移\n",
    "    g1 = (\n",
    "    Grid()\n",
    "        .add(b1, grid_opts=opts.GridOpts(pos_left='20%', pos_right='5%'))  \n",
    "    )\n",
    "    x=g1.render_notebook()\n",
    "    \n",
    "    \n",
    "    return x\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "f4aca91a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"492c76dc39d34a05af580a1e86e2c995\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_492c76dc39d34a05af580a1e86e2c995 = echarts.init(\n",
       "                    document.getElementById('492c76dc39d34a05af580a1e86e2c995'), 'white', {renderer: 'canvas'});\n",
       "                var option_492c76dc39d34a05af580a1e86e2c995 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u70ed\\u95e8\\u666f\\u70b9\\u9500\\u91cf\",\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                5195,\n",
       "                5260,\n",
       "                5300,\n",
       "                5353,\n",
       "                5498,\n",
       "                5702,\n",
       "                5808,\n",
       "                5920,\n",
       "                6005,\n",
       "                6468,\n",
       "                6545,\n",
       "                6764,\n",
       "                8891,\n",
       "                9618,\n",
       "                9633,\n",
       "                9731,\n",
       "                12714,\n",
       "                15277,\n",
       "                19406,\n",
       "                19459\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"color\": new echarts.graphic.LinearGradient(0, 0, 1, 0,    [{offset: 0, color: '#FF4500'}, {offset: 1, color: '#98F898'}], false)\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u70ed\\u95e8\\u666f\\u70b9\\u9500\\u91cf\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u70ed\\u95e8\\u666f\\u70b9\\u9500\\u91cf\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\\u9500\\u91cf\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\\u666f\\u70b9\\u540d\\u79f0\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u957f\\u6068\\u6b4c\",\n",
       "                \"\\u606d\\u738b\\u5e9c\",\n",
       "                \"\\u5929\\u575b\\u516c\\u56ed\",\n",
       "                \"\\u4e1c\\u65b9\\u7eff\\u821f\",\n",
       "                \"\\u5317\\u4eac\\u91ce\\u751f\\u52a8\\u7269\\u56ed\",\n",
       "                \"\\u534e\\u6e05\\u5bab\",\n",
       "                \"\\u534e\\u5c71\\u666f\\u533a\",\n",
       "                \"\\u5357\\u4eac\\u603b\\u7edf\\u5e9c\",\n",
       "                \"\\u7626\\u897f\\u6e56\",\n",
       "                \"\\u4e03\\u5f69\\u4e91\\u5357\\u6b22\\u4e50\\u4e16\\u754c\",\n",
       "                \"\\u73e0\\u6d77\\u957f\\u9686\\u6d77\\u6d0b\\u738b\\u56fd\",\n",
       "                \"\\u4e0a\\u6d77\\u91ce\\u751f\\u52a8\\u7269\\u56ed\",\n",
       "                \"\\u957f\\u9686\\u91ce\\u751f\\u52a8\\u7269\\u4e16\\u754c\",\n",
       "                \"\\u516b\\u8fbe\\u5cad\\u957f\\u57ce\",\n",
       "                \"\\u9890\\u548c\\u56ed\",\n",
       "                \"\\u6210\\u90fd\\u5927\\u718a\\u732b\\u7e41\\u80b2\\u7814\\u7a76\\u57fa\\u5730\",\n",
       "                \"\\u79e6\\u59cb\\u7687\\u5e1d\\u9675\\u535a\\u7269\\u9662\\uff08\\u5175\\u9a6c\\u4fd1\\uff09\",\n",
       "                \"\\u6545\\u5bab\",\n",
       "                \"\\u4e0a\\u6d77\\u6d77\\u660c\\u6d77\\u6d0b\\u516c\\u56ed\",\n",
       "                \"\\u4e0a\\u6d77\\u8fea\\u58eb\\u5c3c\\u4e50\\u56ed\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u70ed\\u95e8\\u666f\\u70b9\\u9500\\u91cf\\u6570\\u636e\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"right\": \"5%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_492c76dc39d34a05af580a1e86e2c995.setOption(option_492c76dc39d34a05af580a1e86e2c995);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x530ae98>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xiaoliang20()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "dd990cc8",
   "metadata": {},
   "outputs": [],
   "source": [
    "def jiaqichuxing_map():\n",
    "    df_tmp1 = df[['城市','销量']]\n",
    "    df_counts = df_tmp1.groupby('城市').sum()\n",
    "    m1 = (\n",
    "        Map()\n",
    "        .add('假期出行分布', [list(z) for z in zip(df_counts.index.values.tolist(), df_counts.values.tolist())], 'china')\n",
    "        .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title='假期出行数据地图分布'),\n",
    "        visualmap_opts=opts.VisualMapOpts(max_=100000, is_piecewise=False,range_color=[\"white\", \"#fa8072\", \"#ed1941\"]),\n",
    "        )\n",
    "    )\n",
    "    m1.render_notebook()\n",
    "    m=m1.render_notebook()\n",
    "    \n",
    "    return m\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "9cc8c984",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"141c8923ed9045018849e5f68992991e\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_141c8923ed9045018849e5f68992991e = echarts.init(\n",
       "                    document.getElementById('141c8923ed9045018849e5f68992991e'), 'white', {renderer: 'canvas'});\n",
       "                var option_141c8923ed9045018849e5f68992991e = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"\\u5047\\u671f\\u51fa\\u884c\\u5206\\u5e03\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"china\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        84084\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u5357\",\n",
       "                    \"value\": [\n",
       "                        28056\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": [\n",
       "                        3959\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        93987\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53f0\\u6e7e\",\n",
       "                    \"value\": [\n",
       "                        1001\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": [\n",
       "                        3772\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": [\n",
       "                        65052\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": [\n",
       "                        5254\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": [\n",
       "                        5622\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": [\n",
       "                        21027\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": [\n",
       "                        32147\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": [\n",
       "                        15904\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": [\n",
       "                        62757\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        37946\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": [\n",
       "                        3614\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": [\n",
       "                        80783\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        11046\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": [\n",
       "                        6826\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": [\n",
       "                        33776\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        45481\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": [\n",
       "                        44123\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": [\n",
       "                        22563\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": [\n",
       "                        6980\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6fb3\\u95e8\",\n",
       "                    \"value\": [\n",
       "                        3128\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": [\n",
       "                        4338\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": [\n",
       "                        23256\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": [\n",
       "                        7028\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        22499\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": [\n",
       "                        10423\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": [\n",
       "                        20054\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": [\n",
       "                        64353\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        4591\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9999\\u6e2f\",\n",
       "                    \"value\": [\n",
       "                        1006\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        4639\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"aspectScale\": 0.75,\n",
       "            \"nameProperty\": \"name\",\n",
       "            \"selectedMode\": false,\n",
       "            \"zoom\": 1,\n",
       "            \"mapValueCalculation\": \"sum\",\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5047\\u671f\\u51fa\\u884c\\u5206\\u5e03\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u5047\\u671f\\u51fa\\u884c\\u5206\\u5e03\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5047\\u671f\\u51fa\\u884c\\u6570\\u636e\\u5730\\u56fe\\u5206\\u5e03\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100000,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"white\",\n",
       "                \"#fa8072\",\n",
       "                \"#ed1941\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_141c8923ed9045018849e5f68992991e.setOption(option_141c8923ed9045018849e5f68992991e);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11ebcca0>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "jiaqichuxing_map()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "3beb9b1a",
   "metadata": {},
   "outputs": [],
   "source": [
    "def xingjijingdian():\n",
    "    df_tmp2 = df[df['星级'].isin(['4A', '5A'])]\n",
    "    df_counts = df_tmp2.groupby('城市').count()['星级']\n",
    "    df0 = df_counts.copy()\n",
    "    df0.sort_values(ascending=False, inplace=True)\n",
    "    c1 = (\n",
    "    Pie()\n",
    "    .add('', [list(z) for z in zip(df0.index.values.tolist(), df0.values.tolist())],\n",
    "         radius=['30%', '100%'],\n",
    "         center=['50%', '60%'],\n",
    "         rosetype='area',\n",
    "         )\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title='各省市4A-5A景点数量玫瑰图'),\n",
    "                     legend_opts=opts.LegendOpts(is_show=False),\n",
    "                     toolbox_opts=opts.ToolboxOpts())\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(is_show=True, position='inside', font_size=12,\n",
    "                                               formatter='{b}: {c}', font_style='italic',\n",
    "                                               font_weight='bold', font_family='Microsoft YaHei'\n",
    "                                               ))\n",
    "    )\n",
    "    c1.render_notebook()\n",
    "    x=c1.render_notebook()\n",
    "    return x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "adfeb457",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"7a989716d8a24538ac132414a99e78e3\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_7a989716d8a24538ac132414a99e78e3 = echarts.init(\n",
       "                    document.getElementById('7a989716d8a24538ac132414a99e78e3'), 'white', {renderer: 'canvas'});\n",
       "                var option_7a989716d8a24538ac132414a99e78e3 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": 47\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": 47\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": 39\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": 38\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": 36\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": 36\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": 34\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": 33\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": 33\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": 32\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": 31\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u5357\",\n",
       "                    \"value\": 31\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": 30\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": 29\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": 27\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 25\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": 24\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": 23\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": 23\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": 19\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": 19\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": 18\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": 18\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": 18\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": 18\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": 17\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": 15\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": 14\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": 10\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": 7\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"30%\",\n",
       "                \"100%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"60%\"\n",
       "            ],\n",
       "            \"roseType\": \"area\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"inside\",\n",
       "                \"margin\": 8,\n",
       "                \"fontSize\": 12,\n",
       "                \"fontStyle\": \"italic\",\n",
       "                \"fontWeight\": \"bold\",\n",
       "                \"fontFamily\": \"Microsoft YaHei\",\n",
       "                \"formatter\": \"{b}: {c}\"\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5b89\\u5fbd\",\n",
       "                \"\\u6c5f\\u82cf\",\n",
       "                \"\\u6cb3\\u5357\",\n",
       "                \"\\u5317\\u4eac\",\n",
       "                \"\\u6e56\\u5317\",\n",
       "                \"\\u6cb3\\u5317\",\n",
       "                \"\\u5c71\\u897f\",\n",
       "                \"\\u6c5f\\u897f\",\n",
       "                \"\\u91cd\\u5e86\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u56db\\u5ddd\",\n",
       "                \"\\u9655\\u897f\",\n",
       "                \"\\u4e91\\u5357\",\n",
       "                \"\\u5c71\\u4e1c\",\n",
       "                \"\\u6d59\\u6c5f\",\n",
       "                \"\\u5e7f\\u897f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u6d77\\u5357\",\n",
       "                \"\\u8fbd\\u5b81\",\n",
       "                \"\\u5185\\u8499\\u53e4\",\n",
       "                \"\\u7518\\u8083\",\n",
       "                \"\\u798f\\u5efa\",\n",
       "                \"\\u5b81\\u590f\",\n",
       "                \"\\u5929\\u6d25\",\n",
       "                \"\\u8d35\\u5dde\",\n",
       "                \"\\u9752\\u6d77\",\n",
       "                \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                \"\\u65b0\\u7586\",\n",
       "                \"\\u6e56\\u5357\",\n",
       "                \"\\u5409\\u6797\",\n",
       "                \"\\u897f\\u85cf\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": false,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5404\\u7701\\u5e024A-5A\\u666f\\u70b9\\u6570\\u91cf\\u73ab\\u7470\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"horizontal\",\n",
       "        \"itemSize\": 15,\n",
       "        \"itemGap\": 10,\n",
       "        \"left\": \"80%\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"type\": \"png\",\n",
       "                \"backgroundColor\": \"auto\",\n",
       "                \"connectedBackgroundColor\": \"#fff\",\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4fdd\\u5b58\\u4e3a\\u56fe\\u7247\",\n",
       "                \"pixelRatio\": 1\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u8fd8\\u539f\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u6570\\u636e\\u89c6\\u56fe\",\n",
       "                \"readOnly\": false,\n",
       "                \"lang\": [\n",
       "                    \"\\u6570\\u636e\\u89c6\\u56fe\",\n",
       "                    \"\\u5173\\u95ed\",\n",
       "                    \"\\u5237\\u65b0\"\n",
       "                ],\n",
       "                \"backgroundColor\": \"#fff\",\n",
       "                \"textareaColor\": \"#fff\",\n",
       "                \"textareaBorderColor\": \"#333\",\n",
       "                \"textColor\": \"#000\",\n",
       "                \"buttonColor\": \"#c23531\",\n",
       "                \"buttonTextColor\": \"#fff\"\n",
       "            },\n",
       "            \"dataZoom\": {\n",
       "                \"show\": true,\n",
       "                \"title\": {\n",
       "                    \"zoom\": \"\\u533a\\u57df\\u7f29\\u653e\",\n",
       "                    \"back\": \"\\u533a\\u57df\\u7f29\\u653e\\u8fd8\\u539f\"\n",
       "                },\n",
       "                \"icon\": {},\n",
       "                \"xAxisIndex\": false,\n",
       "                \"yAxisIndex\": false,\n",
       "                \"filterMode\": \"filter\"\n",
       "            },\n",
       "            \"magicType\": {\n",
       "                \"show\": true,\n",
       "                \"type\": [\n",
       "                    \"line\",\n",
       "                    \"bar\",\n",
       "                    \"stack\",\n",
       "                    \"tiled\"\n",
       "                ],\n",
       "                \"title\": {\n",
       "                    \"line\": \"\\u5207\\u6362\\u4e3a\\u6298\\u7ebf\\u56fe\",\n",
       "                    \"bar\": \"\\u5207\\u6362\\u4e3a\\u67f1\\u72b6\\u56fe\",\n",
       "                    \"stack\": \"\\u5207\\u6362\\u4e3a\\u5806\\u53e0\",\n",
       "                    \"tiled\": \"\\u5207\\u6362\\u4e3a\\u5e73\\u94fa\"\n",
       "                },\n",
       "                \"icon\": {}\n",
       "            },\n",
       "            \"brush\": {\n",
       "                \"icon\": {},\n",
       "                \"title\": {\n",
       "                    \"rect\": \"\\u77e9\\u5f62\\u9009\\u62e9\",\n",
       "                    \"polygon\": \"\\u5708\\u9009\",\n",
       "                    \"lineX\": \"\\u6a2a\\u5411\\u9009\\u62e9\",\n",
       "                    \"lineY\": \"\\u7eb5\\u5411\\u9009\\u62e9\",\n",
       "                    \"keep\": \"\\u4fdd\\u6301\\u9009\\u62e9\",\n",
       "                    \"clear\": \"\\u6e05\\u9664\\u9009\\u62e9\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "                chart_7a989716d8a24538ac132414a99e78e3.setOption(option_7a989716d8a24538ac132414a99e78e3);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x4c362c8>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xingjijingdian()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "c6966475",
   "metadata": {},
   "outputs": [],
   "source": [
    "price_level = [0, 50, 100, 150, 200, 250, 300, 350, 400, 500]    \n",
    "label_level = ['0-50', '50-100', '100-150', '150-200', '200-250', '250-300', '300-350', '350-400', '400-500']    \n",
    "jzmj_cut = pd.cut(df['价格'], price_level, labels=label_level)        \n",
    "df_price = jzmj_cut.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "7ea669e9",
   "metadata": {},
   "outputs": [],
   "source": [
    "def jiage():\n",
    "    color_js = \"\"\"new echarts.graphic.RadialGradient(\n",
    "                    0.5, 0.5, 1,\n",
    "                    [{offset: 0,\n",
    "                      color: '#0000CD'},\n",
    "                     {offset: 1,\n",
    "                      color: '#FFA07A'}\n",
    "                      ])\"\"\"\n",
    "    s2 = (\n",
    "        Scatter()\n",
    "        .add_xaxis(df_price.index.tolist())\n",
    "        .add_yaxis('门票价格区间', df_price.values.tolist(),symbol_size=50,itemstyle_opts=opts.ItemStyleOpts(color=JsCode(color_js))) \n",
    "        .set_global_opts(\n",
    "            yaxis_opts=opts.AxisOpts(name='数量'),\n",
    "            xaxis_opts=opts.AxisOpts(name='价格区间(元)'))\n",
    "        .set_global_opts(visualmap_opts=opts.VisualMapOpts(is_show=False, \n",
    "                                              # 设置通过图形大小来表现数据\n",
    "                                              type_='size',\n",
    "                                              # 图形大小映射范围\n",
    "                                              range_size=[5,50]))\n",
    "    )\n",
    "    s2.render_notebook()\n",
    "    g=s2.render_notebook()\n",
    "    return g\n",
    " \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "4aed5ecc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"d5f32ed1997e4a8db7a1ffd3d85272aa\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_d5f32ed1997e4a8db7a1ffd3d85272aa = echarts.init(\n",
       "                    document.getElementById('d5f32ed1997e4a8db7a1ffd3d85272aa'), 'white', {renderer: 'canvas'});\n",
       "                var option_d5f32ed1997e4a8db7a1ffd3d85272aa = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"scatter\",\n",
       "            \"name\": \"\\u95e8\\u7968\\u4ef7\\u683c\\u533a\\u95f4\",\n",
       "            \"symbolSize\": 50,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"0-50\",\n",
       "                    888\n",
       "                ],\n",
       "                [\n",
       "                    \"50-100\",\n",
       "                    725\n",
       "                ],\n",
       "                [\n",
       "                    \"100-150\",\n",
       "                    278\n",
       "                ],\n",
       "                [\n",
       "                    \"150-200\",\n",
       "                    184\n",
       "                ],\n",
       "                [\n",
       "                    \"200-250\",\n",
       "                    62\n",
       "                ],\n",
       "                [\n",
       "                    \"250-300\",\n",
       "                    59\n",
       "                ],\n",
       "                [\n",
       "                    \"300-350\",\n",
       "                    20\n",
       "                ],\n",
       "                [\n",
       "                    \"350-400\",\n",
       "                    19\n",
       "                ],\n",
       "                [\n",
       "                    \"400-500\",\n",
       "                    13\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"color\": new echarts.graphic.RadialGradient(                    0.5, 0.5, 1,                    [{offset: 0,                      color: '#0000CD'},                     {offset: 1,                      color: '#FFA07A'}                      ])\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u95e8\\u7968\\u4ef7\\u683c\\u533a\\u95f4\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u95e8\\u7968\\u4ef7\\u683c\\u533a\\u95f4\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\\u4ef7\\u683c\\u533a\\u95f4(\\u5143)\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"0-50\",\n",
       "                \"50-100\",\n",
       "                \"100-150\",\n",
       "                \"150-200\",\n",
       "                \"200-250\",\n",
       "                \"250-300\",\n",
       "                \"300-350\",\n",
       "                \"350-400\",\n",
       "                \"400-500\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\\u6570\\u91cf\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": false,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"symbolSize\": [\n",
       "                5,\n",
       "                50\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_d5f32ed1997e4a8db7a1ffd3d85272aa.setOption(option_d5f32ed1997e4a8db7a1ffd3d85272aa);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11ebce50>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "jiage()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "5876cba0",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Building prefix dict from the default dictionary ...\n",
      "Loading model from cache C:\\Users\\admin\\AppData\\Local\\Temp\\jieba.cache\n",
      "Loading model cost 0.880 seconds.\n",
      "Prefix dict has been built successfully.\n"
     ]
    }
   ],
   "source": [
    "contents = \"\".join('%s' % i for i in df['简介'].values.tolist())\n",
    "contents_list = jieba.cut(contents)\n",
    "ac = Counter(contents_list)\n",
    "stopwords = []\n",
    "with open(r'C:\\Users\\admin\\Documents\\stopwords.txt', \"r\",encoding='utf-8') as f:  # 打开文件\n",
    "    data = f.read()  # 读取文件\n",
    "    stopwords = data.split('\\n')\n",
    "for i in stopwords:\n",
    "    del ac[i]\n",
    "\n",
    "def jianjieyun():\n",
    "    w1 = (\n",
    "    WordCloud()\n",
    "    .add(\"\", \n",
    "         ac.most_common(150), \n",
    "         word_size_range=[5, 100], \n",
    "         textstyle_opts=opts.TextStyleOpts(font_family=\"cursive\"),\n",
    "         shape='start')\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title=\"景点简介词云\"))\n",
    "    )\n",
    "    w1.render_notebook()\n",
    "    y=w1.render_notebook()\n",
    "    return y\n",
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "75d2e669",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'echarts-wordcloud':'https://assets.pyecharts.org/assets/echarts-wordcloud.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"1661ca16d6954da98c375d8f06bbf8ea\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'echarts-wordcloud'], function(echarts) {\n",
       "                var chart_1661ca16d6954da98c375d8f06bbf8ea = echarts.init(\n",
       "                    document.getElementById('1661ca16d6954da98c375d8f06bbf8ea'), 'white', {renderer: 'canvas'});\n",
       "                var option_1661ca16d6954da98c375d8f06bbf8ea = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"wordCloud\",\n",
       "            \"shape\": \"circle\",\n",
       "            \"rotationRange\": [\n",
       "                -90,\n",
       "                90\n",
       "            ],\n",
       "            \"rotationStep\": 45,\n",
       "            \"girdSize\": 20,\n",
       "            \"sizeRange\": [\n",
       "                5,\n",
       "                100\n",
       "            ],\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6587\\u5316\",\n",
       "                    \"value\": 151,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(65,14,19)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \" \",\n",
       "                    \"value\": 139,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(117,66,106)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f4d\\u4e8e\",\n",
       "                    \"value\": 94,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(1,21,44)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f53\\u9a8c\",\n",
       "                    \"value\": 94,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(78,29,50)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e16\\u754c\",\n",
       "                    \"value\": 90,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(84,15,140)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e29\\u6cc9\",\n",
       "                    \"value\": 88,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(57,100,39)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65c5\\u6e38\",\n",
       "                    \"value\": 85,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(17,57,114)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e2d\\u56fd\",\n",
       "                    \"value\": 81,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(132,55,140)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u611f\\u53d7\",\n",
       "                    \"value\": 72,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(45,95,80)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f11\\u95f2\",\n",
       "                    \"value\": 72,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(121,1,52)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6709\",\n",
       "                    \"value\": 69,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(7,44,143)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\n\",\n",
       "                    \"value\": 66,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(5,90,127)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u666f\\u533a\",\n",
       "                    \"value\": 60,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(112,76,52)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5386\\u53f2\",\n",
       "                    \"value\": 60,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(78,124,66)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4ee5\",\n",
       "                    \"value\": 56,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(41,93,129)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u96c6\",\n",
       "                    \"value\": 55,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(38,134,152)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u578b\",\n",
       "                    \"value\": 53,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(49,13,9)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e8e\",\n",
       "                    \"value\": 52,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(23,71,104)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u81ea\\u7136\",\n",
       "                    \"value\": 50,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(94,129,92)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e86\",\n",
       "                    \"value\": 48,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(127,116,117)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e50\\u56ed\",\n",
       "                    \"value\": 47,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(42,80,120)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e3b\\u9898\",\n",
       "                    \"value\": 47,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(41,125,152)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u52a8\\u7269\",\n",
       "                    \"value\": 45,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(144,27,159)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5efa\\u7b51\",\n",
       "                    \"value\": 44,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(69,104,48)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fd9\\u91cc\",\n",
       "                    \"value\": 41,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(53,1,160)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5ea6\\u5047\",\n",
       "                    \"value\": 41,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(155,75,109)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u72ec\\u7279\",\n",
       "                    \"value\": 40,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(103,27,127)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u98ce\\u60c5\",\n",
       "                    \"value\": 39,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(151,96,43)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7b49\",\n",
       "                    \"value\": 39,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(125,26,116)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u827a\\u672f\",\n",
       "                    \"value\": 39,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(72,78,97)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e00\\u5ea7\",\n",
       "                    \"value\": 39,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(121,116,136)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5730\",\n",
       "                    \"value\": 37,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(36,76,18)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u672a\\u77e5\",\n",
       "                    \"value\": 37,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(80,9,25)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u535a\\u7269\\u9986\",\n",
       "                    \"value\": 36,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(67,62,45)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u516c\\u91cc\",\n",
       "                    \"value\": 36,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(84,155,4)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9879\\u76ee\",\n",
       "                    \"value\": 35,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(113,17,67)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u98ce\\u5149\",\n",
       "                    \"value\": 35,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(74,40,134)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5a31\\u4e50\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(20,65,70)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6765\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(15,110,99)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u6d0b\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(66,71,129)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u751f\\u6001\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(55,13,62)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c0f\",\n",
       "                    \"value\": 33,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(10,122,0)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7279\\u8272\",\n",
       "                    \"value\": 33,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(137,56,35)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u666f\\u89c2\",\n",
       "                    \"value\": 33,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(93,32,29)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u60a8\",\n",
       "                    \"value\": 32,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(54,34,15)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u517b\\u751f\",\n",
       "                    \"value\": 32,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(29,154,36)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u68ee\\u6797\",\n",
       "                    \"value\": 31,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(11,100,48)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e74\",\n",
       "                    \"value\": 30,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(0,127,59)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u516c\\u56ed\",\n",
       "                    \"value\": 29,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(118,38,69)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7531\",\n",
       "                    \"value\": 29,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(34,10,146)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u603b\",\n",
       "                    \"value\": 29,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(5,3,53)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7740\",\n",
       "                    \"value\": 29,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(114,121,120)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u7136\",\n",
       "                    \"value\": 29,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(34,24,56)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u98ce\\u666f\",\n",
       "                    \"value\": 27,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(153,106,73)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\uff08\",\n",
       "                    \"value\": 27,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(146,11,153)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4eab\\u53d7\",\n",
       "                    \"value\": 26,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(113,16,118)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6253\\u9020\",\n",
       "                    \"value\": 26,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(97,155,16)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5730\\u65b9\",\n",
       "                    \"value\": 26,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(139,154,49)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\",\n",
       "                    \"value\": 26,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(120,65,158)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u666f\\u8272\",\n",
       "                    \"value\": 26,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(128,24,48)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u89c2\\u5149\",\n",
       "                    \"value\": 26,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(12,119,35)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u770b\",\n",
       "                    \"value\": 25,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(108,139,52)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5343\\u5e74\",\n",
       "                    \"value\": 25,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(36,143,84)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c34\",\n",
       "                    \"value\": 25,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(3,124,36)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5723\\u5730\",\n",
       "                    \"value\": 24,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(109,89,24)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5b63\",\n",
       "                    \"value\": 24,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(128,131,31)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7f8e\\u666f\",\n",
       "                    \"value\": 24,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(158,122,36)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u6c34\",\n",
       "                    \"value\": 24,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(146,123,102)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u89c2\\u8d4f\",\n",
       "                    \"value\": 24,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(5,70,98)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56fd\\u5bb6\",\n",
       "                    \"value\": 24,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(121,119,31)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\",\n",
       "                    \"value\": 23,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(154,132,108)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7efc\\u5408\\u6027\",\n",
       "                    \"value\": 23,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(34,155,68)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9886\\u7565\",\n",
       "                    \"value\": 22,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(143,108,29)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u57ce\\u5e02\",\n",
       "                    \"value\": 22,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(152,53,12)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u81ea\\u7136\",\n",
       "                    \"value\": 22,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(59,64,12)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u597d\\u53bb\\u5904\",\n",
       "                    \"value\": 22,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(2,21,85)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8457\\u540d\",\n",
       "                    \"value\": 22,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(87,1,57)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5ea6\\u5047\\u533a\",\n",
       "                    \"value\": 22,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(152,93,156)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": 22,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(20,87,31)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5ce1\\u8c37\",\n",
       "                    \"value\": 21,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(128,108,110)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u795e\\u5947\",\n",
       "                    \"value\": 21,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(138,102,134)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56fd\\u9645\",\n",
       "                    \"value\": 21,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(66,135,31)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\uff09\",\n",
       "                    \"value\": 21,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(128,117,121)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u57fa\\u5730\",\n",
       "                    \"value\": 20,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(25,52,28)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53e4\\u4ee3\",\n",
       "                    \"value\": 20,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(14,74,84)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7ea6\",\n",
       "                    \"value\": 20,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(42,91,128)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4eba\",\n",
       "                    \"value\": 20,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(66,117,6)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u533a\",\n",
       "                    \"value\": 20,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(37,48,63)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56ed\\u6797\",\n",
       "                    \"value\": 20,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(91,105,141)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d6a\\u6f2b\",\n",
       "                    \"value\": 20,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(64,99,22)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c0f\\u9547\",\n",
       "                    \"value\": 19,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(54,38,119)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e30\\u5bcc\",\n",
       "                    \"value\": 19,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(103,82,155)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c34\\u4e0a\",\n",
       "                    \"value\": 19,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(145,159,135)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u68a6\\u5e7b\",\n",
       "                    \"value\": 19,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(122,118,43)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5904\",\n",
       "                    \"value\": 19,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(66,77,95)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c57\",\n",
       "                    \"value\": 19,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(76,105,139)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5168\\u7403\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(140,68,6)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6708\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(59,9,89)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u52a8\\u7269\\u56ed\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(59,38,22)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7cbe\\u534e\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(157,95,81)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9762\\u79ef\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(64,131,133)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b22\\u4e50\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(67,38,67)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u5357\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(15,49,24)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u666f\\u70b9\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(24,137,134)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53bb\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(112,149,80)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(47,53,58)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5ba4\\u5185\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(55,47,52)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e3b\\u9898\\u516c\\u56ed\",\n",
       "                    \"value\": 18,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(146,69,147)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53ca\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(47,55,78)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e4b\\u65c5\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(149,30,49)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b23\\u8d4f\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(59,12,46)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f5b\\u6559\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(9,143,82)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\uff01\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(1,86,46)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9986\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(2,65,31)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7f8e\\u4e3d\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(75,24,42)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u751f\\u6d3b\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(143,18,61)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u62e5\\u6709\",\n",
       "                    \"value\": 17,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(60,15,144)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5168\\u56fd\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(45,138,78)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c06\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(100,29,27)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e38\\u89c8\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(85,32,101)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6211\\u56fd\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(16,95,53)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5360\\u5730\\u9762\\u79ef\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(128,157,13)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e2a\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(35,132,117)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e26\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(157,123,39)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4ea9\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(59,144,20)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6295\\u8d44\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(62,71,92)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9ec4\\u6cb3\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(121,0,92)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c55\\u793a\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(76,139,132)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7c73\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(101,143,68)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e38\\u5ba2\",\n",
       "                    \"value\": 16,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(85,12,160)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u523a\\u6fc0\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(69,126,53)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(112,156,107)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9910\\u996e\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(136,54,94)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u82b1\\u6d77\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(22,2,136)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u63a2\\u7d22\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(51,109,153)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9b45\\u529b\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(93,47,82)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56fd\\u5185\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(72,139,131)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\uff1a\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(27,98,53)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c11\\u65cf\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(22,53,22)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6f14\\u51fa\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(24,85,9)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91ce\\u751f\\u52a8\\u7269\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(139,129,145)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f20\\u7edf\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(66,127,64)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u63a5\\u89e6\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(86,53,158)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u58ee\\u89c2\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(157,51,137)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8349\\u539f\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(143,41,14)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5750\\u843d\\u4e8e\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(33,138,81)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u84b8\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(29,159,47)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e5f\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(143,115,88)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u4e0b\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(142,153,17)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\",\n",
       "                    \"value\": 15,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(156,127,65)\"\n",
       "                        }\n",
       "                    }\n",
       "                }\n",
       "            ],\n",
       "            \"drawOutOfBound\": false,\n",
       "            \"textStyle\": {\n",
       "                \"normal\": {\n",
       "                    \"fontFamily\": \"cursive\"\n",
       "                },\n",
       "                \"emphasis\": {}\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u666f\\u70b9\\u7b80\\u4ecb\\u8bcd\\u4e91\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_1661ca16d6954da98c375d8f06bbf8ea.setOption(option_1661ca16d6954da98c375d8f06bbf8ea);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11d863a0>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "jianjieyun()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "bfb8c102",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>164</th>\n",
       "      <td>40.048543</td>\n",
       "      <td>116.506291</td>\n",
       "      <td>红砖美术馆Red Brick Art Museum</td>\n",
       "      <td>5</td>\n",
       "      <td>144</td>\n",
       "      <td>北京景点排名第49</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>40.449137</td>\n",
       "      <td>116.541102</td>\n",
       "      <td>箭扣长城Jiankou Great Wall</td>\n",
       "      <td>16</td>\n",
       "      <td>193</td>\n",
       "      <td>北京景点排名第125</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>40.565287</td>\n",
       "      <td>115.825543</td>\n",
       "      <td>海坨山Haituo Mountain</td>\n",
       "      <td>5</td>\n",
       "      <td>63</td>\n",
       "      <td>北京景点排名第174</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>40.666026</td>\n",
       "      <td>116.257788</td>\n",
       "      <td>百里山水画廊Baili Landscape Gallery Scenic Spot</td>\n",
       "      <td>2</td>\n",
       "      <td>186</td>\n",
       "      <td>北京景点排名第3387</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>198</th>\n",
       "      <td>40.593058</td>\n",
       "      <td>116.956189</td>\n",
       "      <td>云峰山Yunfeng Mountain</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>北京景点排名第4</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>134</th>\n",
       "      <td>40.2103029487</td>\n",
       "      <td>116.6880264897</td>\n",
       "      <td>潮白河Chaobai River</td>\n",
       "      <td>0</td>\n",
       "      <td>26</td>\n",
       "      <td>北京景点排名第26</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>133</th>\n",
       "      <td>39.926585</td>\n",
       "      <td>116.402229</td>\n",
       "      <td>西六宫West Palaces</td>\n",
       "      <td>2</td>\n",
       "      <td>18</td>\n",
       "      <td>北京景点排名第2047</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>132</th>\n",
       "      <td>40.053179</td>\n",
       "      <td>116.494676</td>\n",
       "      <td>圣露海利根花园Shenglu Hailigen Garden</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>131</th>\n",
       "      <td>40.466305</td>\n",
       "      <td>115.782485</td>\n",
       "      <td>奥伦达部落Orenda</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>39.9210460564</td>\n",
       "      <td>115.6401222857</td>\n",
       "      <td>北京门头沟西达摩村</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               lat             lng                                       景点名称  \\\n",
       "164      40.048543      116.506291                  红砖美术馆Red Brick Art Museum   \n",
       "38       40.449137      116.541102                     箭扣长城Jiankou Great Wall   \n",
       "16       40.565287      115.825543                         海坨山Haituo Mountain   \n",
       "15       40.666026      116.257788  百里山水画廊Baili Landscape Gallery Scenic Spot   \n",
       "198      40.593058      116.956189                        云峰山Yunfeng Mountain   \n",
       "..             ...             ...                                        ...   \n",
       "134  40.2103029487  116.6880264897                           潮白河Chaobai River   \n",
       "133      39.926585      116.402229                            西六宫West Palaces   \n",
       "132      40.053179      116.494676             圣露海利根花园Shenglu Hailigen Garden   \n",
       "131      40.466305      115.782485                                奥伦达部落Orenda   \n",
       "199  39.9210460564  115.6401222857                                  北京门头沟西达摩村   \n",
       "\n",
       "    攻略提到数量 点评数量         景点排名   星级  \n",
       "164      5  144    北京景点排名第49  98%  \n",
       "38      16  193   北京景点排名第125  98%  \n",
       "16       5   63   北京景点排名第174  98%  \n",
       "15       2  186  北京景点排名第3387  98%  \n",
       "198      2   49     北京景点排名第4  98%  \n",
       "..     ...  ...          ...  ...  \n",
       "134      0   26    北京景点排名第26   0%  \n",
       "133      2   18  北京景点排名第2047   0%  \n",
       "132      0    6                0%  \n",
       "131      0    8                0%  \n",
       "199      0    0                0%  \n",
       "\n",
       "[200 rows x 7 columns]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "urllst = []\n",
    "ui = 'https://travel.qunar.com/p-cs299914-beijing-jingdian-1-'\n",
    "for i in range(1,21):\n",
    "    urllst.append(ui +str(i))\n",
    "\n",
    "    \n",
    "#访问页面加解析\n",
    "# 初步访问页面\n",
    "u1 = urllst[1]\n",
    "r = requests.get(u1)\n",
    "soup = BeautifulSoup(r.text, 'lxml')\n",
    "ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "li = ul.find_all('li')\n",
    "li1 = li[0]\n",
    "# 筛选第一个数据\n",
    "dic = {}\n",
    "dic['lat'] = li1['data-lat']\n",
    "dic['lng'] = li1['data-lng']\n",
    "dic['景点名称'] = li1.find('span',class_=\"cn_tit\").text\n",
    "dic['攻略提到数量'] = li1.find('div',class_=\"strategy_sum\").text\n",
    "dic['点评数量'] = li1.find('div',class_=\"comment_sum\").text\n",
    "dic['景点排名'] = li1.find('span',class_=\"ranking_sum\").text\n",
    "dic['星级'] = li1.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "# 标签识别\n",
    "\n",
    "datai = []\n",
    "n=0\n",
    "for i in li:\n",
    "    n+=1\n",
    "    dic = {}\n",
    "    dic['lat'] = i['data-lat']\n",
    "    dic['lng'] = i['data-lng']\n",
    "    dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "    dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "    dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "    dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "    dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "    datai.append(dic)\n",
    "# 分别获取字段内容\n",
    "        \n",
    "datai[:2]\n",
    "datai = []\n",
    "n=0\n",
    "for ui in urllst:\n",
    "    r = requests.get(ui)\n",
    "    soup = BeautifulSoup(r.text, 'lxml')\n",
    "        # 访问数据\n",
    "    ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "    li = ul.find_all('li')\n",
    "        # 解析标签\n",
    "    for i in li:\n",
    "        n+=1\n",
    "        dic = {}\n",
    "        dic['lat'] = i['data-lat']\n",
    "        dic['lng'] = i['data-lng']\n",
    "        dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "        dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "        dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "        dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "        dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "        datai.append(dic)\n",
    "        #print('成功采集%i条数据' % n)\n",
    "        # 分别获取字段内容\n",
    "datai[:5]\n",
    "\n",
    "df = pd.DataFrame(datai)\n",
    "df.sort_values('星级',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "8f954b8a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "      <th>rn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>39.924091</td>\n",
       "      <td>116.403414</td>\n",
       "      <td>故宫The Palace Museum</td>\n",
       "      <td>153</td>\n",
       "      <td>31918</td>\n",
       "      <td>北京景点排名第1</td>\n",
       "      <td>94%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>40.661046</td>\n",
       "      <td>117.284632</td>\n",
       "      <td>古北水镇Gubei Water Town</td>\n",
       "      <td>33</td>\n",
       "      <td>3478</td>\n",
       "      <td>北京景点排名第1</td>\n",
       "      <td>92%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>40.359586</td>\n",
       "      <td>116.001343</td>\n",
       "      <td>八达岭野生动物世界Badaling Wildlife World</td>\n",
       "      <td>1</td>\n",
       "      <td>845</td>\n",
       "      <td>北京景点排名第1</td>\n",
       "      <td>88%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>40.362639</td>\n",
       "      <td>116.024067</td>\n",
       "      <td>八达岭长城Badaling Great Wall</td>\n",
       "      <td>25</td>\n",
       "      <td>13899</td>\n",
       "      <td>北京景点排名第1</td>\n",
       "      <td>92%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>40.268794</td>\n",
       "      <td>117.24851</td>\n",
       "      <td>石林峡ShilinGorge</td>\n",
       "      <td>3</td>\n",
       "      <td>681</td>\n",
       "      <td>北京景点排名第1</td>\n",
       "      <td>88%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>39.959169</td>\n",
       "      <td>115.720747</td>\n",
       "      <td>双龙峡Shuanglong Gorge</td>\n",
       "      <td>2</td>\n",
       "      <td>152</td>\n",
       "      <td>北京景点排名第1</td>\n",
       "      <td>80%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>40.389488</td>\n",
       "      <td>116.634124</td>\n",
       "      <td>红螺寺Hongluo Temple</td>\n",
       "      <td>4</td>\n",
       "      <td>601</td>\n",
       "      <td>北京景点排名第1</td>\n",
       "      <td>88%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>39.950257</td>\n",
       "      <td>116.347445</td>\n",
       "      <td>北京海洋馆Beijing Aquarium</td>\n",
       "      <td>5</td>\n",
       "      <td>1143</td>\n",
       "      <td>北京景点排名第1</td>\n",
       "      <td>88%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>40.5773332579</td>\n",
       "      <td>117.2101049653</td>\n",
       "      <td>密云人间花海薰衣草庄园Miyun Renjian Flower Ocean Lavender...</td>\n",
       "      <td>1</td>\n",
       "      <td>72</td>\n",
       "      <td>北京景点排名第2</td>\n",
       "      <td>90%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>40.557851</td>\n",
       "      <td>116.009343</td>\n",
       "      <td>龙庆峡Longqing Gorge</td>\n",
       "      <td>4</td>\n",
       "      <td>726</td>\n",
       "      <td>北京景点排名第2</td>\n",
       "      <td>84%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>39.8992767334</td>\n",
       "      <td>116.0337155855</td>\n",
       "      <td>八奇洞Mentougou Baqi Cave</td>\n",
       "      <td>2</td>\n",
       "      <td>47</td>\n",
       "      <td>北京景点排名第2</td>\n",
       "      <td>100%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>40.187688</td>\n",
       "      <td>116.803564</td>\n",
       "      <td>北京国际鲜花港Beijing International Flower Port</td>\n",
       "      <td>1</td>\n",
       "      <td>621</td>\n",
       "      <td>北京景点排名第2</td>\n",
       "      <td>92%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>40.382065</td>\n",
       "      <td>116.90818</td>\n",
       "      <td>张裕爱斐堡国际酒庄Beijing Chateau Changyu Afip Global</td>\n",
       "      <td>5</td>\n",
       "      <td>530</td>\n",
       "      <td>北京景点排名第2</td>\n",
       "      <td>94%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>39.943166</td>\n",
       "      <td>116.4095</td>\n",
       "      <td>南锣鼓巷Nanluoguxiang</td>\n",
       "      <td>96</td>\n",
       "      <td>4101</td>\n",
       "      <td>北京景点排名第2</td>\n",
       "      <td>88%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>40.37105</td>\n",
       "      <td>116.21284</td>\n",
       "      <td>碓臼峪Changping Duijiuyu Natural Scenic Resort</td>\n",
       "      <td>1</td>\n",
       "      <td>34</td>\n",
       "      <td>北京景点排名第2</td>\n",
       "      <td>80%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>40.008129</td>\n",
       "      <td>115.74066</td>\n",
       "      <td>灵水村Lingshui Village</td>\n",
       "      <td>2</td>\n",
       "      <td>105</td>\n",
       "      <td>北京景点排名第3</td>\n",
       "      <td>74%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>40.440146</td>\n",
       "      <td>116.575896</td>\n",
       "      <td>慕田峪长城Mutianyu Great Wall</td>\n",
       "      <td>5</td>\n",
       "      <td>4198</td>\n",
       "      <td>北京景点排名第3</td>\n",
       "      <td>94%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>39.910095</td>\n",
       "      <td>116.404091</td>\n",
       "      <td>天安门广场Tiananmen Square</td>\n",
       "      <td>60</td>\n",
       "      <td>8310</td>\n",
       "      <td>北京景点排名第3</td>\n",
       "      <td>94%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>40.4148653341</td>\n",
       "      <td>115.864832839</td>\n",
       "      <td>野鸭湖国家湿地公园Beijing Wild Duck Lake National Wetla...</td>\n",
       "      <td>3</td>\n",
       "      <td>440</td>\n",
       "      <td>北京景点排名第3</td>\n",
       "      <td>82%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>40.2798983186</td>\n",
       "      <td>116.975711347</td>\n",
       "      <td>丫髻山Yaji Mountain</td>\n",
       "      <td>2</td>\n",
       "      <td>72</td>\n",
       "      <td>北京景点排名第4</td>\n",
       "      <td>60%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>39.693589</td>\n",
       "      <td>115.943241</td>\n",
       "      <td>周口店北京人遗址博物馆Zhoukoudian Peking Man Site Museum</td>\n",
       "      <td>1</td>\n",
       "      <td>358</td>\n",
       "      <td>北京景点排名第4</td>\n",
       "      <td>86%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>40.663649</td>\n",
       "      <td>117.292856</td>\n",
       "      <td>司马台长城Simatai Great Wall</td>\n",
       "      <td>12</td>\n",
       "      <td>852</td>\n",
       "      <td>北京景点排名第4</td>\n",
       "      <td>96%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>40.593058</td>\n",
       "      <td>116.956189</td>\n",
       "      <td>云峰山Yunfeng Mountain</td>\n",
       "      <td>2</td>\n",
       "      <td>49</td>\n",
       "      <td>北京景点排名第4</td>\n",
       "      <td>98%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>40.004869</td>\n",
       "      <td>116.278749</td>\n",
       "      <td>颐和园Summer Palace</td>\n",
       "      <td>101</td>\n",
       "      <td>15210</td>\n",
       "      <td>北京景点排名第4</td>\n",
       "      <td>94%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>40.523289</td>\n",
       "      <td>116.92017</td>\n",
       "      <td>密云水库Miyun Reservoir</td>\n",
       "      <td>8</td>\n",
       "      <td>106</td>\n",
       "      <td>北京景点排名第5</td>\n",
       "      <td>94%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>40.656816</td>\n",
       "      <td>117.281965</td>\n",
       "      <td>山顶教堂Hilltop Church</td>\n",
       "      <td>4</td>\n",
       "      <td>82</td>\n",
       "      <td>北京景点排名第5</td>\n",
       "      <td>94%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>40.3985718632</td>\n",
       "      <td>116.6751771931</td>\n",
       "      <td>雁栖湖Yanqi Lake</td>\n",
       "      <td>8</td>\n",
       "      <td>684</td>\n",
       "      <td>北京景点排名第5</td>\n",
       "      <td>92%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>39.943381</td>\n",
       "      <td>116.392599</td>\n",
       "      <td>恭王府Prince Gong's Mansion</td>\n",
       "      <td>37</td>\n",
       "      <td>3364</td>\n",
       "      <td>北京景点排名第5</td>\n",
       "      <td>90%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>40.109359</td>\n",
       "      <td>116.37742</td>\n",
       "      <td>温都水城冰雪嘉年华Wendu Shuicheng Ice and Snow Happy Town</td>\n",
       "      <td>0</td>\n",
       "      <td>39</td>\n",
       "      <td>北京景点排名第6</td>\n",
       "      <td>80%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>39.889918</td>\n",
       "      <td>116.419289</td>\n",
       "      <td>天坛Temple of Heaven</td>\n",
       "      <td>50</td>\n",
       "      <td>5141</td>\n",
       "      <td>北京景点排名第6</td>\n",
       "      <td>90%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>40.399959</td>\n",
       "      <td>115.858315</td>\n",
       "      <td>康西草原Kangxi Grassland</td>\n",
       "      <td>3</td>\n",
       "      <td>91</td>\n",
       "      <td>北京景点排名第6</td>\n",
       "      <td>70%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>40.419287</td>\n",
       "      <td>116.307167</td>\n",
       "      <td>黄花城水长城Huanghuacheng Underwater Great Wall</td>\n",
       "      <td>4</td>\n",
       "      <td>513</td>\n",
       "      <td>北京景点排名第6</td>\n",
       "      <td>96%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>39.87673</td>\n",
       "      <td>116.092996</td>\n",
       "      <td>戒台寺Jietai Temple</td>\n",
       "      <td>2</td>\n",
       "      <td>300</td>\n",
       "      <td>北京景点排名第6</td>\n",
       "      <td>90%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>40.654341</td>\n",
       "      <td>117.27846</td>\n",
       "      <td>永顺染坊Yongshun Dyeing Workshop</td>\n",
       "      <td>5</td>\n",
       "      <td>140</td>\n",
       "      <td>北京景点排名第6</td>\n",
       "      <td>86%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>39.911449</td>\n",
       "      <td>116.408018</td>\n",
       "      <td>中国国家博物馆National Museum of China</td>\n",
       "      <td>20</td>\n",
       "      <td>1538</td>\n",
       "      <td>北京景点排名第7</td>\n",
       "      <td>94%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>40.659002</td>\n",
       "      <td>117.283538</td>\n",
       "      <td>震远镖局Zhen Yuan Escort Agency</td>\n",
       "      <td>3</td>\n",
       "      <td>72</td>\n",
       "      <td>北京景点排名第7</td>\n",
       "      <td>94%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>40.0870099338</td>\n",
       "      <td>115.7820224114</td>\n",
       "      <td>珍珠湖Pearl Lake</td>\n",
       "      <td>6</td>\n",
       "      <td>34</td>\n",
       "      <td>北京景点排名第7</td>\n",
       "      <td>56%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>40.55826</td>\n",
       "      <td>115.895804</td>\n",
       "      <td>玉渡山景区Yudu Mountain Natural Scenic Area</td>\n",
       "      <td>4</td>\n",
       "      <td>431</td>\n",
       "      <td>北京景点排名第8</td>\n",
       "      <td>96%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>40.016191</td>\n",
       "      <td>116.309736</td>\n",
       "      <td>圆明园Old Summer Palace</td>\n",
       "      <td>50</td>\n",
       "      <td>5561</td>\n",
       "      <td>北京景点排名第8</td>\n",
       "      <td>88%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>39.991061</td>\n",
       "      <td>116.501104</td>\n",
       "      <td>798艺术区798 Art Zone</td>\n",
       "      <td>58</td>\n",
       "      <td>1286</td>\n",
       "      <td>北京景点排名第9</td>\n",
       "      <td>88%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              lat             lng  \\\n",
       "0       39.924091      116.403414   \n",
       "1       40.661046      117.284632   \n",
       "2       40.359586      116.001343   \n",
       "3       40.362639      116.024067   \n",
       "4       40.268794       117.24851   \n",
       "5       39.959169      115.720747   \n",
       "6       40.389488      116.634124   \n",
       "7       39.950257      116.347445   \n",
       "8   40.5773332579  117.2101049653   \n",
       "9       40.557851      116.009343   \n",
       "10  39.8992767334  116.0337155855   \n",
       "11      40.187688      116.803564   \n",
       "12      40.382065       116.90818   \n",
       "13      39.943166        116.4095   \n",
       "14       40.37105       116.21284   \n",
       "15      40.008129       115.74066   \n",
       "16      40.440146      116.575896   \n",
       "17      39.910095      116.404091   \n",
       "18  40.4148653341   115.864832839   \n",
       "19  40.2798983186   116.975711347   \n",
       "20      39.693589      115.943241   \n",
       "21      40.663649      117.292856   \n",
       "22      40.593058      116.956189   \n",
       "23      40.004869      116.278749   \n",
       "24      40.523289       116.92017   \n",
       "25      40.656816      117.281965   \n",
       "26  40.3985718632  116.6751771931   \n",
       "27      39.943381      116.392599   \n",
       "28      40.109359       116.37742   \n",
       "29      39.889918      116.419289   \n",
       "30      40.399959      115.858315   \n",
       "31      40.419287      116.307167   \n",
       "32       39.87673      116.092996   \n",
       "33      40.654341       117.27846   \n",
       "34      39.911449      116.408018   \n",
       "35      40.659002      117.283538   \n",
       "36  40.0870099338  115.7820224114   \n",
       "37       40.55826      115.895804   \n",
       "38      40.016191      116.309736   \n",
       "39      39.991061      116.501104   \n",
       "\n",
       "                                                 景点名称 攻略提到数量   点评数量      景点排名  \\\n",
       "0                                 故宫The Palace Museum    153  31918  北京景点排名第1   \n",
       "1                                古北水镇Gubei Water Town     33   3478  北京景点排名第1   \n",
       "2                    八达岭野生动物世界Badaling Wildlife World      1    845  北京景点排名第1   \n",
       "3                            八达岭长城Badaling Great Wall     25  13899  北京景点排名第1   \n",
       "4                                      石林峡ShilinGorge      3    681  北京景点排名第1   \n",
       "5                                 双龙峡Shuanglong Gorge      2    152  北京景点排名第1   \n",
       "6                                   红螺寺Hongluo Temple      4    601  北京景点排名第1   \n",
       "7                               北京海洋馆Beijing Aquarium      5   1143  北京景点排名第1   \n",
       "8   密云人间花海薰衣草庄园Miyun Renjian Flower Ocean Lavender...      1     72  北京景点排名第2   \n",
       "9                                   龙庆峡Longqing Gorge      4    726  北京景点排名第2   \n",
       "10                             八奇洞Mentougou Baqi Cave      2     47  北京景点排名第2   \n",
       "11           北京国际鲜花港Beijing International Flower Port      1    621  北京景点排名第2   \n",
       "12       张裕爱斐堡国际酒庄Beijing Chateau Changyu Afip Global      5    530  北京景点排名第2   \n",
       "13                                  南锣鼓巷Nanluoguxiang     96   4101  北京景点排名第2   \n",
       "14        碓臼峪Changping Duijiuyu Natural Scenic Resort      1     34  北京景点排名第2   \n",
       "15                                灵水村Lingshui Village      2    105  北京景点排名第3   \n",
       "16                           慕田峪长城Mutianyu Great Wall      5   4198  北京景点排名第3   \n",
       "17                              天安门广场Tiananmen Square     60   8310  北京景点排名第3   \n",
       "18  野鸭湖国家湿地公园Beijing Wild Duck Lake National Wetla...      3    440  北京景点排名第3   \n",
       "19                                   丫髻山Yaji Mountain      2     72  北京景点排名第4   \n",
       "20      周口店北京人遗址博物馆Zhoukoudian Peking Man Site Museum      1    358  北京景点排名第4   \n",
       "21                            司马台长城Simatai Great Wall     12    852  北京景点排名第4   \n",
       "22                                云峰山Yunfeng Mountain      2     49  北京景点排名第4   \n",
       "23                                   颐和园Summer Palace    101  15210  北京景点排名第4   \n",
       "24                                密云水库Miyun Reservoir      8    106  北京景点排名第5   \n",
       "25                                 山顶教堂Hilltop Church      4     82  北京景点排名第5   \n",
       "26                                      雁栖湖Yanqi Lake      8    684  北京景点排名第5   \n",
       "27                           恭王府Prince Gong's Mansion     37   3364  北京景点排名第5   \n",
       "28   温都水城冰雪嘉年华Wendu Shuicheng Ice and Snow Happy Town      0     39  北京景点排名第6   \n",
       "29                                 天坛Temple of Heaven     50   5141  北京景点排名第6   \n",
       "30                               康西草原Kangxi Grassland      3     91  北京景点排名第6   \n",
       "31          黄花城水长城Huanghuacheng Underwater Great Wall      4    513  北京景点排名第6   \n",
       "32                                   戒台寺Jietai Temple      2    300  北京景点排名第6   \n",
       "33                       永顺染坊Yongshun Dyeing Workshop      5    140  北京景点排名第6   \n",
       "34                    中国国家博物馆National Museum of China     20   1538  北京景点排名第7   \n",
       "35                        震远镖局Zhen Yuan Escort Agency      3     72  北京景点排名第7   \n",
       "36                                      珍珠湖Pearl Lake      6     34  北京景点排名第7   \n",
       "37             玉渡山景区Yudu Mountain Natural Scenic Area      4    431  北京景点排名第8   \n",
       "38                               圆明园Old Summer Palace     50   5561  北京景点排名第8   \n",
       "39                                 798艺术区798 Art Zone     58   1286  北京景点排名第9   \n",
       "\n",
       "      星级  rn  \n",
       "0    94%   1  \n",
       "1    92%   1  \n",
       "2    88%   1  \n",
       "3    92%   1  \n",
       "4    88%   1  \n",
       "5    80%   1  \n",
       "6    88%   1  \n",
       "7    88%   1  \n",
       "8    90%   2  \n",
       "9    84%   2  \n",
       "10  100%   2  \n",
       "11   92%   2  \n",
       "12   94%   2  \n",
       "13   88%   2  \n",
       "14   80%   2  \n",
       "15   74%   3  \n",
       "16   94%   3  \n",
       "17   94%   3  \n",
       "18   82%   3  \n",
       "19   60%   4  \n",
       "20   86%   4  \n",
       "21   96%   4  \n",
       "22   98%   4  \n",
       "23   94%   4  \n",
       "24   94%   5  \n",
       "25   94%   5  \n",
       "26   92%   5  \n",
       "27   90%   5  \n",
       "28   80%   6  \n",
       "29   90%   6  \n",
       "30   70%   6  \n",
       "31   96%   6  \n",
       "32   90%   6  \n",
       "33   86%   6  \n",
       "34   94%   7  \n",
       "35   94%   7  \n",
       "36   56%   7  \n",
       "37   96%   8  \n",
       "38   88%   8  \n",
       "39   88%   9  "
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['景点排名'].replace('',np.nan,inplace=True)\n",
    "df.dropna(subset=['景点排名'], inplace=True)\n",
    "df['rn']=df['景点排名'].apply(lambda x:int(re.sub(\"\\D\",\"\",x)))\n",
    "dat=df.sort_values('rn')\n",
    "db=dat[dat['rn']<10]\n",
    "db.reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "e2edfb39",
   "metadata": {},
   "outputs": [],
   "source": [
    "fen=[db.iloc[i]['景点名称']for i in range(db.shape[0])]\n",
    "lng=[db.iloc[i]['lng'] for i in range(db.shape[0])]\n",
    "lat=[db.iloc[i]['lat'] for i in range(db.shape[0])]\n",
    "value=[db.iloc[i]['点评数量'] for i in range(db.shape[0])]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "9b80cd03",
   "metadata": {},
   "outputs": [],
   "source": [
    "def beijingsandian():\n",
    "    def geo_add_custom_coordinate():\n",
    "        geo = Geo(init_opts=opts.InitOpts(theme='light',\n",
    "                                      width='1000px',\n",
    "                                      height='600px',\n",
    "                                      bg_color = '#EEEEE8'))\n",
    "        for i in range(len(db)):\n",
    "                geo.add_coordinate(fen[i], lng[i],lat[i])\n",
    "                geo.add_schema(maptype=\"北京\")\n",
    "                # 为自定义的点添加属性\n",
    "                geo.add(\"\",[(fen[i], value[i])],type_='effectScatter')#type_='heatmap' 热力图 #type_='effectScatter' 涟漪散点图\n",
    "                geo.set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "                geo.set_global_opts(title_opts=opts.TitleOpts(title=\"北京旅游景点涟漪散点图\"),visualmap_opts=opts.VisualMapOpts())\n",
    "        return geo\n",
    "    chart = geo_add_custom_coordinate()\n",
    "    chart.render_notebook()\n",
    "    b=chart.render_notebook()\n",
    "    return b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "3b237f00",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '北京':'https://assets.pyecharts.org/assets/maps/beijing'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"aeda3e62c14748a2b2226ea1917cad11\" style=\"width:1000px; height:600px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '北京'], function(echarts) {\n",
       "                var chart_aeda3e62c14748a2b2226ea1917cad11 = echarts.init(\n",
       "                    document.getElementById('aeda3e62c14748a2b2226ea1917cad11'), 'light', {renderer: 'canvas'});\n",
       "                var option_aeda3e62c14748a2b2226ea1917cad11 = {\n",
       "    \"backgroundColor\": \"#EEEEE8\",\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6545\\u5babThe Palace Museum\",\n",
       "                    \"value\": [\n",
       "                        \"116.403414\",\n",
       "                        \"39.924091\",\n",
       "                        \"31918\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u53e4\\u5317\\u6c34\\u9547Gubei Water Town\",\n",
       "                    \"value\": [\n",
       "                        \"117.284632\",\n",
       "                        \"40.661046\",\n",
       "                        \"3478\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u516b\\u8fbe\\u5cad\\u91ce\\u751f\\u52a8\\u7269\\u4e16\\u754cBadaling Wildlife World\",\n",
       "                    \"value\": [\n",
       "                        \"116.001343\",\n",
       "                        \"40.359586\",\n",
       "                        \"845\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u516b\\u8fbe\\u5cad\\u957f\\u57ceBadaling Great Wall\",\n",
       "                    \"value\": [\n",
       "                        \"116.024067\",\n",
       "                        \"40.362639\",\n",
       "                        \"13899\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u77f3\\u6797\\u5ce1ShilinGorge\",\n",
       "                    \"value\": [\n",
       "                        \"117.24851\",\n",
       "                        \"40.268794\",\n",
       "                        \"681\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u53cc\\u9f99\\u5ce1Shuanglong Gorge\",\n",
       "                    \"value\": [\n",
       "                        \"115.720747\",\n",
       "                        \"39.959169\",\n",
       "                        \"152\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7ea2\\u87ba\\u5bfaHongluo Temple\",\n",
       "                    \"value\": [\n",
       "                        \"116.634124\",\n",
       "                        \"40.389488\",\n",
       "                        \"601\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\\u6d77\\u6d0b\\u9986Beijing Aquarium\",\n",
       "                    \"value\": [\n",
       "                        \"116.347445\",\n",
       "                        \"39.950257\",\n",
       "                        \"1143\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5bc6\\u4e91\\u4eba\\u95f4\\u82b1\\u6d77\\u85b0\\u8863\\u8349\\u5e84\\u56edMiyun Renjian Flower Ocean Lavender Manor\",\n",
       "                    \"value\": [\n",
       "                        \"117.2101049653\",\n",
       "                        \"40.5773332579\",\n",
       "                        \"72\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9f99\\u5e86\\u5ce1Longqing Gorge\",\n",
       "                    \"value\": [\n",
       "                        \"116.009343\",\n",
       "                        \"40.557851\",\n",
       "                        \"726\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u516b\\u5947\\u6d1eMentougou Baqi Cave\",\n",
       "                    \"value\": [\n",
       "                        \"116.0337155855\",\n",
       "                        \"39.8992767334\",\n",
       "                        \"47\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\\u56fd\\u9645\\u9c9c\\u82b1\\u6e2fBeijing International Flower Port\",\n",
       "                    \"value\": [\n",
       "                        \"116.803564\",\n",
       "                        \"40.187688\",\n",
       "                        \"621\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5f20\\u88d5\\u7231\\u6590\\u5821\\u56fd\\u9645\\u9152\\u5e84Beijing Chateau Changyu Afip Global\",\n",
       "                    \"value\": [\n",
       "                        \"116.90818\",\n",
       "                        \"40.382065\",\n",
       "                        \"530\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u9523\\u9f13\\u5df7Nanluoguxiang\",\n",
       "                    \"value\": [\n",
       "                        \"116.4095\",\n",
       "                        \"39.943166\",\n",
       "                        \"4101\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7893\\u81fc\\u5ceaChangping Duijiuyu Natural Scenic Resort\",\n",
       "                    \"value\": [\n",
       "                        \"116.21284\",\n",
       "                        \"40.37105\",\n",
       "                        \"34\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7075\\u6c34\\u6751Lingshui Village\",\n",
       "                    \"value\": [\n",
       "                        \"115.74066\",\n",
       "                        \"40.008129\",\n",
       "                        \"105\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6155\\u7530\\u5cea\\u957f\\u57ceMutianyu Great Wall\",\n",
       "                    \"value\": [\n",
       "                        \"116.575896\",\n",
       "                        \"40.440146\",\n",
       "                        \"4198\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u5b89\\u95e8\\u5e7f\\u573aTiananmen Square\",\n",
       "                    \"value\": [\n",
       "                        \"116.404091\",\n",
       "                        \"39.910095\",\n",
       "                        \"8310\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u91ce\\u9e2d\\u6e56\\u56fd\\u5bb6\\u6e7f\\u5730\\u516c\\u56edBeijing Wild Duck Lake National Wetland Park\",\n",
       "                    \"value\": [\n",
       "                        \"115.864832839\",\n",
       "                        \"40.4148653341\",\n",
       "                        \"440\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e2b\\u9afb\\u5c71Yaji Mountain\",\n",
       "                    \"value\": [\n",
       "                        \"116.975711347\",\n",
       "                        \"40.2798983186\",\n",
       "                        \"72\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5468\\u53e3\\u5e97\\u5317\\u4eac\\u4eba\\u9057\\u5740\\u535a\\u7269\\u9986Zhoukoudian Peking Man Site Museum\",\n",
       "                    \"value\": [\n",
       "                        \"115.943241\",\n",
       "                        \"39.693589\",\n",
       "                        \"358\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u53f8\\u9a6c\\u53f0\\u957f\\u57ceSimatai Great Wall\",\n",
       "                    \"value\": [\n",
       "                        \"117.292856\",\n",
       "                        \"40.663649\",\n",
       "                        \"852\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u5cf0\\u5c71Yunfeng Mountain\",\n",
       "                    \"value\": [\n",
       "                        \"116.956189\",\n",
       "                        \"40.593058\",\n",
       "                        \"49\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9890\\u548c\\u56edSummer Palace\",\n",
       "                    \"value\": [\n",
       "                        \"116.278749\",\n",
       "                        \"40.004869\",\n",
       "                        \"15210\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5bc6\\u4e91\\u6c34\\u5e93Miyun Reservoir\",\n",
       "                    \"value\": [\n",
       "                        \"116.92017\",\n",
       "                        \"40.523289\",\n",
       "                        \"106\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u9876\\u6559\\u5802Hilltop Church\",\n",
       "                    \"value\": [\n",
       "                        \"117.281965\",\n",
       "                        \"40.656816\",\n",
       "                        \"82\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u96c1\\u6816\\u6e56Yanqi Lake\",\n",
       "                    \"value\": [\n",
       "                        \"116.6751771931\",\n",
       "                        \"40.3985718632\",\n",
       "                        \"684\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u606d\\u738b\\u5e9cPrince Gong's Mansion\",\n",
       "                    \"value\": [\n",
       "                        \"116.392599\",\n",
       "                        \"39.943381\",\n",
       "                        \"3364\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6e29\\u90fd\\u6c34\\u57ce\\u51b0\\u96ea\\u5609\\u5e74\\u534eWendu Shuicheng Ice and Snow Happy Town\",\n",
       "                    \"value\": [\n",
       "                        \"116.37742\",\n",
       "                        \"40.109359\",\n",
       "                        \"39\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u575bTemple of Heaven\",\n",
       "                    \"value\": [\n",
       "                        \"116.419289\",\n",
       "                        \"39.889918\",\n",
       "                        \"5141\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5eb7\\u897f\\u8349\\u539fKangxi Grassland\",\n",
       "                    \"value\": [\n",
       "                        \"115.858315\",\n",
       "                        \"40.399959\",\n",
       "                        \"91\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9ec4\\u82b1\\u57ce\\u6c34\\u957f\\u57ceHuanghuacheng Underwater Great Wall\",\n",
       "                    \"value\": [\n",
       "                        \"116.307167\",\n",
       "                        \"40.419287\",\n",
       "                        \"513\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6212\\u53f0\\u5bfaJietai Temple\",\n",
       "                    \"value\": [\n",
       "                        \"116.092996\",\n",
       "                        \"39.87673\",\n",
       "                        \"300\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6c38\\u987a\\u67d3\\u574aYongshun Dyeing Workshop\",\n",
       "                    \"value\": [\n",
       "                        \"117.27846\",\n",
       "                        \"40.654341\",\n",
       "                        \"140\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e2d\\u56fd\\u56fd\\u5bb6\\u535a\\u7269\\u9986National Museum of China\",\n",
       "                    \"value\": [\n",
       "                        \"116.408018\",\n",
       "                        \"39.911449\",\n",
       "                        \"1538\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9707\\u8fdc\\u9556\\u5c40Zhen Yuan Escort Agency\",\n",
       "                    \"value\": [\n",
       "                        \"117.283538\",\n",
       "                        \"40.659002\",\n",
       "                        \"72\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u73cd\\u73e0\\u6e56Pearl Lake\",\n",
       "                    \"value\": [\n",
       "                        \"115.7820224114\",\n",
       "                        \"40.0870099338\",\n",
       "                        \"34\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7389\\u6e21\\u5c71\\u666f\\u533aYudu Mountain Natural Scenic Area\",\n",
       "                    \"value\": [\n",
       "                        \"115.895804\",\n",
       "                        \"40.55826\",\n",
       "                        \"431\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5706\\u660e\\u56edOld Summer Palace\",\n",
       "                    \"value\": [\n",
       "                        \"116.309736\",\n",
       "                        \"40.016191\",\n",
       "                        \"5561\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"798\\u827a\\u672f\\u533a798 Art Zone\",\n",
       "                    \"value\": [\n",
       "                        \"116.501104\",\n",
       "                        \"39.991061\",\n",
       "                        \"1286\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5317\\u4eac\\u65c5\\u6e38\\u666f\\u70b9\\u6d9f\\u6f2a\\u6563\\u70b9\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"\\u5317\\u4eac\",\n",
       "        \"roam\": true,\n",
       "        \"aspectScale\": 0.75,\n",
       "        \"nameProperty\": \"name\",\n",
       "        \"selectedMode\": false,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_aeda3e62c14748a2b2226ea1917cad11.setOption(option_aeda3e62c14748a2b2226ea1917cad11);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1456b298>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "beijingsandian()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "725c8dd7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>120</th>\n",
       "      <td>23.506937</td>\n",
       "      <td>113.055147</td>\n",
       "      <td>美林湖温泉Mayland Resort Hotel</td>\n",
       "      <td>1</td>\n",
       "      <td>361</td>\n",
       "      <td>广州景点排名第12</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>23.007944</td>\n",
       "      <td>113.321711</td>\n",
       "      <td>长隆野生动物世界Chimelong Safari Park</td>\n",
       "      <td>132</td>\n",
       "      <td>16712</td>\n",
       "      <td>广州景点排名第1</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>23.18634</td>\n",
       "      <td>113.3983</td>\n",
       "      <td>火炉山森林公园Huolu Mountain Forest Park</td>\n",
       "      <td>1</td>\n",
       "      <td>163</td>\n",
       "      <td>广州景点排名第1140</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>23.128772</td>\n",
       "      <td>113.27439</td>\n",
       "      <td>广州大佛寺Guangzhou Big Buddha Temple</td>\n",
       "      <td>2</td>\n",
       "      <td>100</td>\n",
       "      <td>广州景点排名第331</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>23.006399</td>\n",
       "      <td>113.330527</td>\n",
       "      <td>广州长隆度假区Guangzhou Chimelong Tourist Resort</td>\n",
       "      <td>10</td>\n",
       "      <td>6109</td>\n",
       "      <td>广州景点排名第5</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118</th>\n",
       "      <td>23.1402587891</td>\n",
       "      <td>113.2915706311</td>\n",
       "      <td>建设六马路Building No.6 Road</td>\n",
       "      <td>2</td>\n",
       "      <td>64</td>\n",
       "      <td>广州景点排名第660</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117</th>\n",
       "      <td>23.125406</td>\n",
       "      <td>113.302761</td>\n",
       "      <td>逵园艺术馆Kuiyuan 1922 Art Gallery</td>\n",
       "      <td>0</td>\n",
       "      <td>21</td>\n",
       "      <td>广州景点排名第419</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>116</th>\n",
       "      <td>23.425034</td>\n",
       "      <td>113.902198</td>\n",
       "      <td>正果寺Zhengguosi</td>\n",
       "      <td>1</td>\n",
       "      <td>13</td>\n",
       "      <td>广州景点排名第2</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>23.129543</td>\n",
       "      <td>113.274466</td>\n",
       "      <td>北京街广百文化广场Beijing Street Guangbai Cultural Square</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>23.005314</td>\n",
       "      <td>113.32549</td>\n",
       "      <td>非洲森林</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>广州景点排名第739</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               lat             lng  \\\n",
       "120      23.506937      113.055147   \n",
       "1        23.007944      113.321711   \n",
       "97        23.18634        113.3983   \n",
       "73       23.128772       113.27439   \n",
       "16       23.006399      113.330527   \n",
       "..             ...             ...   \n",
       "118  23.1402587891  113.2915706311   \n",
       "117      23.125406      113.302761   \n",
       "116      23.425034      113.902198   \n",
       "107      23.129543      113.274466   \n",
       "199      23.005314       113.32549   \n",
       "\n",
       "                                                 景点名称 攻略提到数量   点评数量  \\\n",
       "120                         美林湖温泉Mayland Resort Hotel      1    361   \n",
       "1                       长隆野生动物世界Chimelong Safari Park    132  16712   \n",
       "97                  火炉山森林公园Huolu Mountain Forest Park      1    163   \n",
       "73                   广州大佛寺Guangzhou Big Buddha Temple      2    100   \n",
       "16          广州长隆度假区Guangzhou Chimelong Tourist Resort     10   6109   \n",
       "..                                                ...    ...    ...   \n",
       "118                           建设六马路Building No.6 Road      2     64   \n",
       "117                     逵园艺术馆Kuiyuan 1922 Art Gallery      0     21   \n",
       "116                                     正果寺Zhengguosi      1     13   \n",
       "107  北京街广百文化广场Beijing Street Guangbai Cultural Square      0      4   \n",
       "199                                              非洲森林      0      0   \n",
       "\n",
       "            景点排名   星级  \n",
       "120    广州景点排名第12  98%  \n",
       "1       广州景点排名第1  96%  \n",
       "97   广州景点排名第1140  96%  \n",
       "73    广州景点排名第331  96%  \n",
       "16      广州景点排名第5  96%  \n",
       "..           ...  ...  \n",
       "118   广州景点排名第660   0%  \n",
       "117   广州景点排名第419   0%  \n",
       "116     广州景点排名第2   0%  \n",
       "107                0%  \n",
       "199   广州景点排名第739   0%  \n",
       "\n",
       "[200 rows x 7 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "urllst = []\n",
    "ui = 'https://travel.qunar.com/p-cs300132-guangzhou-jingdian-1-'\n",
    "for i in range(1,21):\n",
    "    urllst.append(ui +str(i))\n",
    "\n",
    "    \n",
    "#访问页面加解析\n",
    "# 初步访问页面\n",
    "u1 = urllst[1]\n",
    "r = requests.get(u1)\n",
    "soup = BeautifulSoup(r.text, 'lxml')\n",
    "ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "li = ul.find_all('li')\n",
    "li1 = li[0]\n",
    "# 筛选第一个数据\n",
    "dic = {}\n",
    "dic['lat'] = li1['data-lat']\n",
    "dic['lng'] = li1['data-lng']\n",
    "dic['景点名称'] = li1.find('span',class_=\"cn_tit\").text\n",
    "dic['攻略提到数量'] = li1.find('div',class_=\"strategy_sum\").text\n",
    "dic['点评数量'] = li1.find('div',class_=\"comment_sum\").text\n",
    "dic['景点排名'] = li1.find('span',class_=\"ranking_sum\").text\n",
    "dic['星级'] = li1.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "# 标签识别\n",
    "\n",
    "datai = []\n",
    "n=0\n",
    "for i in li:\n",
    "    n+=1\n",
    "    dic = {}\n",
    "    dic['lat'] = i['data-lat']\n",
    "    dic['lng'] = i['data-lng']\n",
    "    dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "    dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "    dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "    dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "    dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "    datai.append(dic)\n",
    "# 分别获取字段内容\n",
    "        \n",
    "datai[:2]\n",
    "datai = []\n",
    "n=0\n",
    "for ui in urllst:\n",
    "    r = requests.get(ui)\n",
    "    soup = BeautifulSoup(r.text, 'lxml')\n",
    "        # 访问数据\n",
    "    ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "    li = ul.find_all('li')\n",
    "        # 解析标签\n",
    "    for i in li:\n",
    "        n+=1\n",
    "        dic = {}\n",
    "        dic['lat'] = i['data-lat']\n",
    "        dic['lng'] = i['data-lng']\n",
    "        dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "        dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "        dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "        dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "        dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "        datai.append(dic)\n",
    "        #print('成功采集%i条数据' % n)\n",
    "        # 分别获取字段内容\n",
    "datai[:5]\n",
    "\n",
    "df = pd.DataFrame(datai)\n",
    "df.sort_values('星级',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "5bdada63",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "      <th>rn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>23.65494</td>\n",
       "      <td>113.658891</td>\n",
       "      <td>从化温泉风景区Conghua Hot Spring Scenic Area</td>\n",
       "      <td>2</td>\n",
       "      <td>103</td>\n",
       "      <td>广州景点排名第1</td>\n",
       "      <td>86%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>23.007944</td>\n",
       "      <td>113.321711</td>\n",
       "      <td>长隆野生动物世界Chimelong Safari Park</td>\n",
       "      <td>132</td>\n",
       "      <td>16712</td>\n",
       "      <td>广州景点排名第1</td>\n",
       "      <td>96%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>23.6555761078</td>\n",
       "      <td>113.6369028672</td>\n",
       "      <td>天湖旅游风景区Tianhu Tourism Scenic Area</td>\n",
       "      <td>1</td>\n",
       "      <td>28</td>\n",
       "      <td>广州景点排名第1</td>\n",
       "      <td>100%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>23.467507</td>\n",
       "      <td>113.267391</td>\n",
       "      <td>花都香草世界Vanilla World</td>\n",
       "      <td>1</td>\n",
       "      <td>455</td>\n",
       "      <td>广州景点排名第1</td>\n",
       "      <td>72%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>23.405862</td>\n",
       "      <td>113.186642</td>\n",
       "      <td>圆玄道观The Yuen Yuen Taoist Temple Of Guangdong</td>\n",
       "      <td>1</td>\n",
       "      <td>239</td>\n",
       "      <td>广州景点排名第1</td>\n",
       "      <td>92%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>23.631008</td>\n",
       "      <td>113.788742</td>\n",
       "      <td>石门国家森林公园Shimen National Park</td>\n",
       "      <td>1</td>\n",
       "      <td>362</td>\n",
       "      <td>广州景点排名第2</td>\n",
       "      <td>90%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>23.425034</td>\n",
       "      <td>113.902198</td>\n",
       "      <td>正果寺Zhengguosi</td>\n",
       "      <td>1</td>\n",
       "      <td>13</td>\n",
       "      <td>广州景点排名第2</td>\n",
       "      <td>0%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>23.112223</td>\n",
       "      <td>113.331084</td>\n",
       "      <td>广州塔Canton Tower</td>\n",
       "      <td>204</td>\n",
       "      <td>13048</td>\n",
       "      <td>广州景点排名第2</td>\n",
       "      <td>92%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>23.113316</td>\n",
       "      <td>113.607356</td>\n",
       "      <td>海蚀洞Sea Chasm</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>广州景点排名第3</td>\n",
       "      <td>86%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>23.112627</td>\n",
       "      <td>113.251119</td>\n",
       "      <td>沙面Shamian Island</td>\n",
       "      <td>151</td>\n",
       "      <td>4658</td>\n",
       "      <td>广州景点排名第3</td>\n",
       "      <td>90%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>23.756617</td>\n",
       "      <td>113.789932</td>\n",
       "      <td>流溪河国家森林公园Liuxi River National Park</td>\n",
       "      <td>3</td>\n",
       "      <td>484</td>\n",
       "      <td>广州景点排名第3</td>\n",
       "      <td>88%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>22.792189</td>\n",
       "      <td>113.614387</td>\n",
       "      <td>虎门大桥Humen Pearl River Bridge</td>\n",
       "      <td>1</td>\n",
       "      <td>294</td>\n",
       "      <td>广州景点排名第3</td>\n",
       "      <td>82%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>23.137758</td>\n",
       "      <td>113.332856</td>\n",
       "      <td>正佳极地海洋世界Grandview Aquarium</td>\n",
       "      <td>0</td>\n",
       "      <td>967</td>\n",
       "      <td>广州景点排名第4</td>\n",
       "      <td>84%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>23.120782</td>\n",
       "      <td>113.266557</td>\n",
       "      <td>石室圣心大教堂Sacred Heart Cathedral</td>\n",
       "      <td>72</td>\n",
       "      <td>1072</td>\n",
       "      <td>广州景点排名第4</td>\n",
       "      <td>90%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>23.719128</td>\n",
       "      <td>113.873632</td>\n",
       "      <td>溪头旅游村Xitou Village</td>\n",
       "      <td>4</td>\n",
       "      <td>110</td>\n",
       "      <td>广州景点排名第4</td>\n",
       "      <td>92%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>23.3931121826</td>\n",
       "      <td>113.6727491375</td>\n",
       "      <td>客家围垄屋Hakka Round Houses</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>广州景点排名第5</td>\n",
       "      <td>80%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>23.006399</td>\n",
       "      <td>113.330527</td>\n",
       "      <td>广州长隆度假区Guangzhou Chimelong Tourist Resort</td>\n",
       "      <td>10</td>\n",
       "      <td>6109</td>\n",
       "      <td>广州景点排名第5</td>\n",
       "      <td>96%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>23.190623</td>\n",
       "      <td>113.306556</td>\n",
       "      <td>白云山Baiyun Mountain</td>\n",
       "      <td>8</td>\n",
       "      <td>1589</td>\n",
       "      <td>广州景点排名第6</td>\n",
       "      <td>90%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>23.589976</td>\n",
       "      <td>113.822317</td>\n",
       "      <td>大丰门景区Dafengmen Sceneic Area</td>\n",
       "      <td>3</td>\n",
       "      <td>25</td>\n",
       "      <td>广州景点排名第6</td>\n",
       "      <td>80%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>23.445546</td>\n",
       "      <td>113.493827</td>\n",
       "      <td>北回归线公园The North Tropic of Cancer Sign Park</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>广州景点排名第6</td>\n",
       "      <td>100%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>23.109831</td>\n",
       "      <td>113.305934</td>\n",
       "      <td>珠江夜游广州塔·中大码头Guangzhou Tower Pier Night Tour</td>\n",
       "      <td>4</td>\n",
       "      <td>449</td>\n",
       "      <td>广州景点排名第6</td>\n",
       "      <td>84%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>23.599255</td>\n",
       "      <td>113.771154</td>\n",
       "      <td>白水寨风景名胜区Baishuizhai Scenic Area</td>\n",
       "      <td>3</td>\n",
       "      <td>1672</td>\n",
       "      <td>广州景点排名第7</td>\n",
       "      <td>90%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23.132609</td>\n",
       "      <td>113.251995</td>\n",
       "      <td>陈家祠Chen Clan Ancestral Hall</td>\n",
       "      <td>61</td>\n",
       "      <td>2268</td>\n",
       "      <td>广州景点排名第8</td>\n",
       "      <td>90%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>23.698237</td>\n",
       "      <td>113.886979</td>\n",
       "      <td>阿婆六村Apo Liu Village</td>\n",
       "      <td>4</td>\n",
       "      <td>25</td>\n",
       "      <td>广州景点排名第8</td>\n",
       "      <td>100%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>23.094555</td>\n",
       "      <td>113.259118</td>\n",
       "      <td>太古仓Butterfield &amp; Swire's Godowns &amp; Wharf</td>\n",
       "      <td>6</td>\n",
       "      <td>316</td>\n",
       "      <td>广州景点排名第8</td>\n",
       "      <td>86%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>23.132204</td>\n",
       "      <td>113.571118</td>\n",
       "      <td>增城荔枝文化村Zengcheng Lichee Wenhuacun</td>\n",
       "      <td>1</td>\n",
       "      <td>43</td>\n",
       "      <td>广州景点排名第9</td>\n",
       "      <td>60%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              lat             lng  \\\n",
       "0        23.65494      113.658891   \n",
       "1       23.007944      113.321711   \n",
       "2   23.6555761078  113.6369028672   \n",
       "3       23.467507      113.267391   \n",
       "4       23.405862      113.186642   \n",
       "5       23.631008      113.788742   \n",
       "6       23.425034      113.902198   \n",
       "7       23.112223      113.331084   \n",
       "8       23.113316      113.607356   \n",
       "9       23.112627      113.251119   \n",
       "10      23.756617      113.789932   \n",
       "11      22.792189      113.614387   \n",
       "12      23.137758      113.332856   \n",
       "13      23.120782      113.266557   \n",
       "14      23.719128      113.873632   \n",
       "15  23.3931121826  113.6727491375   \n",
       "16      23.006399      113.330527   \n",
       "17      23.190623      113.306556   \n",
       "18      23.589976      113.822317   \n",
       "19      23.445546      113.493827   \n",
       "20      23.109831      113.305934   \n",
       "21      23.599255      113.771154   \n",
       "22      23.132609      113.251995   \n",
       "23      23.698237      113.886979   \n",
       "24      23.094555      113.259118   \n",
       "25      23.132204      113.571118   \n",
       "\n",
       "                                            景点名称 攻略提到数量   点评数量      景点排名  \\\n",
       "0          从化温泉风景区Conghua Hot Spring Scenic Area      2    103  广州景点排名第1   \n",
       "1                  长隆野生动物世界Chimelong Safari Park    132  16712  广州景点排名第1   \n",
       "2              天湖旅游风景区Tianhu Tourism Scenic Area      1     28  广州景点排名第1   \n",
       "3                            花都香草世界Vanilla World      1    455  广州景点排名第1   \n",
       "4   圆玄道观The Yuen Yuen Taoist Temple Of Guangdong      1    239  广州景点排名第1   \n",
       "5                   石门国家森林公园Shimen National Park      1    362  广州景点排名第2   \n",
       "6                                  正果寺Zhengguosi      1     13  广州景点排名第2   \n",
       "7                                广州塔Canton Tower    204  13048  广州景点排名第2   \n",
       "8                                   海蚀洞Sea Chasm      1     12  广州景点排名第3   \n",
       "9                               沙面Shamian Island    151   4658  广州景点排名第3   \n",
       "10            流溪河国家森林公园Liuxi River National Park      3    484  广州景点排名第3   \n",
       "11                  虎门大桥Humen Pearl River Bridge      1    294  广州景点排名第3   \n",
       "12                    正佳极地海洋世界Grandview Aquarium      0    967  广州景点排名第4   \n",
       "13                 石室圣心大教堂Sacred Heart Cathedral     72   1072  广州景点排名第4   \n",
       "14                            溪头旅游村Xitou Village      4    110  广州景点排名第4   \n",
       "15                       客家围垄屋Hakka Round Houses      1      8  广州景点排名第5   \n",
       "16     广州长隆度假区Guangzhou Chimelong Tourist Resort     10   6109  广州景点排名第5   \n",
       "17                            白云山Baiyun Mountain      8   1589  广州景点排名第6   \n",
       "18                   大丰门景区Dafengmen Sceneic Area      3     25  广州景点排名第6   \n",
       "19    北回归线公园The North Tropic of Cancer Sign Park      1      8  广州景点排名第6   \n",
       "20   珠江夜游广州塔·中大码头Guangzhou Tower Pier Night Tour      4    449  广州景点排名第6   \n",
       "21               白水寨风景名胜区Baishuizhai Scenic Area      3   1672  广州景点排名第7   \n",
       "22                   陈家祠Chen Clan Ancestral Hall     61   2268  广州景点排名第8   \n",
       "23                           阿婆六村Apo Liu Village      4     25  广州景点排名第8   \n",
       "24      太古仓Butterfield & Swire's Godowns & Wharf      6    316  广州景点排名第8   \n",
       "25             增城荔枝文化村Zengcheng Lichee Wenhuacun      1     43  广州景点排名第9   \n",
       "\n",
       "      星级  rn  \n",
       "0    86%   1  \n",
       "1    96%   1  \n",
       "2   100%   1  \n",
       "3    72%   1  \n",
       "4    92%   1  \n",
       "5    90%   2  \n",
       "6     0%   2  \n",
       "7    92%   2  \n",
       "8    86%   3  \n",
       "9    90%   3  \n",
       "10   88%   3  \n",
       "11   82%   3  \n",
       "12   84%   4  \n",
       "13   90%   4  \n",
       "14   92%   4  \n",
       "15   80%   5  \n",
       "16   96%   5  \n",
       "17   90%   6  \n",
       "18   80%   6  \n",
       "19  100%   6  \n",
       "20   84%   6  \n",
       "21   90%   7  \n",
       "22   90%   8  \n",
       "23  100%   8  \n",
       "24   86%   8  \n",
       "25   60%   9  "
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['景点排名'].replace('',np.nan,inplace=True)\n",
    "df.dropna(subset=['景点排名'], inplace=True)\n",
    "df['rn']=df['景点排名'].apply(lambda x:int(re.sub(\"\\D\",\"\",x)))\n",
    "dat=df.sort_values('rn')\n",
    "db=dat[dat['rn']<10]\n",
    "db.reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "ffb5ec4d",
   "metadata": {},
   "outputs": [],
   "source": [
    "fen=[db.iloc[i]['景点名称']for i in range(db.shape[0])]\n",
    "lng=[db.iloc[i]['lng'] for i in range(db.shape[0])]\n",
    "lat=[db.iloc[i]['lat'] for i in range(db.shape[0])]\n",
    "value=[db.iloc[i]['点评数量'] for i in range(db.shape[0])]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "8ed8037b",
   "metadata": {},
   "outputs": [],
   "source": [
    "def guangzhousandian():\n",
    "    def geo_add_custom_coordinate():\n",
    "        geo = Geo(init_opts=opts.InitOpts(theme='light',\n",
    "                                      width='1000px',\n",
    "                                      height='600px',\n",
    "                                      bg_color = '#EEEEE8'))\n",
    "        for i in range(len(db)):\n",
    "                geo.add_coordinate(fen[i], lng[i],lat[i])\n",
    "                geo.add_schema(maptype=\"广州\")\n",
    "                # 为自定义的点添加属性\n",
    "                geo.add(\"\",[(fen[i], value[i])],type_='effectScatter')#type_='heatmap' 热力图 #type_='effectScatter' 涟漪散点图\n",
    "                geo.set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "                geo.set_global_opts(title_opts=opts.TitleOpts(title=\"广州旅游景点涟漪散点图\"),visualmap_opts=opts.VisualMapOpts())\n",
    "        return geo\n",
    "    chart = geo_add_custom_coordinate()\n",
    "    chart.render_notebook()\n",
    "    g=chart.render_notebook()\n",
    "    return g"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "2089d355",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '广州':'https://assets.pyecharts.org/assets/maps/guang3_dong1_guang3_zhou1'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"1087777ac0f045bc90722c05bdfd49a6\" style=\"width:1000px; height:600px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '广州'], function(echarts) {\n",
       "                var chart_1087777ac0f045bc90722c05bdfd49a6 = echarts.init(\n",
       "                    document.getElementById('1087777ac0f045bc90722c05bdfd49a6'), 'light', {renderer: 'canvas'});\n",
       "                var option_1087777ac0f045bc90722c05bdfd49a6 = {\n",
       "    \"backgroundColor\": \"#EEEEE8\",\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4ece\\u5316\\u6e29\\u6cc9\\u98ce\\u666f\\u533aConghua Hot Spring Scenic Area\",\n",
       "                    \"value\": [\n",
       "                        \"113.658891\",\n",
       "                        \"23.65494\",\n",
       "                        \"103\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u9686\\u91ce\\u751f\\u52a8\\u7269\\u4e16\\u754cChimelong Safari Park\",\n",
       "                    \"value\": [\n",
       "                        \"113.321711\",\n",
       "                        \"23.007944\",\n",
       "                        \"16712\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6e56\\u65c5\\u6e38\\u98ce\\u666f\\u533aTianhu Tourism Scenic Area\",\n",
       "                    \"value\": [\n",
       "                        \"113.6369028672\",\n",
       "                        \"23.6555761078\",\n",
       "                        \"28\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u82b1\\u90fd\\u9999\\u8349\\u4e16\\u754cVanilla World\",\n",
       "                    \"value\": [\n",
       "                        \"113.267391\",\n",
       "                        \"23.467507\",\n",
       "                        \"455\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5706\\u7384\\u9053\\u89c2The Yuen Yuen Taoist Temple Of Guangdong\",\n",
       "                    \"value\": [\n",
       "                        \"113.186642\",\n",
       "                        \"23.405862\",\n",
       "                        \"239\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u77f3\\u95e8\\u56fd\\u5bb6\\u68ee\\u6797\\u516c\\u56edShimen National Park\",\n",
       "                    \"value\": [\n",
       "                        \"113.788742\",\n",
       "                        \"23.631008\",\n",
       "                        \"362\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6b63\\u679c\\u5bfaZhengguosi\",\n",
       "                    \"value\": [\n",
       "                        \"113.902198\",\n",
       "                        \"23.425034\",\n",
       "                        \"13\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\\u5854Canton Tower\",\n",
       "                    \"value\": [\n",
       "                        \"113.331084\",\n",
       "                        \"23.112223\",\n",
       "                        \"13048\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u8680\\u6d1eSea Chasm\",\n",
       "                    \"value\": [\n",
       "                        \"113.607356\",\n",
       "                        \"23.113316\",\n",
       "                        \"12\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6c99\\u9762Shamian Island\",\n",
       "                    \"value\": [\n",
       "                        \"113.251119\",\n",
       "                        \"23.112627\",\n",
       "                        \"4658\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6d41\\u6eaa\\u6cb3\\u56fd\\u5bb6\\u68ee\\u6797\\u516c\\u56edLiuxi River National Park\",\n",
       "                    \"value\": [\n",
       "                        \"113.789932\",\n",
       "                        \"23.756617\",\n",
       "                        \"484\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u864e\\u95e8\\u5927\\u6865Humen Pearl River Bridge\",\n",
       "                    \"value\": [\n",
       "                        \"113.614387\",\n",
       "                        \"22.792189\",\n",
       "                        \"294\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6b63\\u4f73\\u6781\\u5730\\u6d77\\u6d0b\\u4e16\\u754cGrandview Aquarium\",\n",
       "                    \"value\": [\n",
       "                        \"113.332856\",\n",
       "                        \"23.137758\",\n",
       "                        \"967\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u77f3\\u5ba4\\u5723\\u5fc3\\u5927\\u6559\\u5802Sacred Heart Cathedral\",\n",
       "                    \"value\": [\n",
       "                        \"113.266557\",\n",
       "                        \"23.120782\",\n",
       "                        \"1072\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6eaa\\u5934\\u65c5\\u6e38\\u6751Xitou Village\",\n",
       "                    \"value\": [\n",
       "                        \"113.873632\",\n",
       "                        \"23.719128\",\n",
       "                        \"110\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5ba2\\u5bb6\\u56f4\\u5784\\u5c4bHakka Round Houses\",\n",
       "                    \"value\": [\n",
       "                        \"113.6727491375\",\n",
       "                        \"23.3931121826\",\n",
       "                        \"8\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\\u957f\\u9686\\u5ea6\\u5047\\u533aGuangzhou Chimelong Tourist Resort\",\n",
       "                    \"value\": [\n",
       "                        \"113.330527\",\n",
       "                        \"23.006399\",\n",
       "                        \"6109\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u767d\\u4e91\\u5c71Baiyun Mountain\",\n",
       "                    \"value\": [\n",
       "                        \"113.306556\",\n",
       "                        \"23.190623\",\n",
       "                        \"1589\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u4e30\\u95e8\\u666f\\u533aDafengmen Sceneic Area\",\n",
       "                    \"value\": [\n",
       "                        \"113.822317\",\n",
       "                        \"23.589976\",\n",
       "                        \"25\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u56de\\u5f52\\u7ebf\\u516c\\u56edThe North Tropic of Cancer Sign Park\",\n",
       "                    \"value\": [\n",
       "                        \"113.493827\",\n",
       "                        \"23.445546\",\n",
       "                        \"8\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u73e0\\u6c5f\\u591c\\u6e38\\u5e7f\\u5dde\\u5854\\u00b7\\u4e2d\\u5927\\u7801\\u5934Guangzhou Tower Pier Night Tour\",\n",
       "                    \"value\": [\n",
       "                        \"113.305934\",\n",
       "                        \"23.109831\",\n",
       "                        \"449\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u767d\\u6c34\\u5be8\\u98ce\\u666f\\u540d\\u80dc\\u533aBaishuizhai Scenic Area\",\n",
       "                    \"value\": [\n",
       "                        \"113.771154\",\n",
       "                        \"23.599255\",\n",
       "                        \"1672\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9648\\u5bb6\\u7960Chen Clan Ancestral Hall\",\n",
       "                    \"value\": [\n",
       "                        \"113.251995\",\n",
       "                        \"23.132609\",\n",
       "                        \"2268\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u963f\\u5a46\\u516d\\u6751Apo Liu Village\",\n",
       "                    \"value\": [\n",
       "                        \"113.886979\",\n",
       "                        \"23.698237\",\n",
       "                        \"25\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u592a\\u53e4\\u4ed3Butterfield & Swire's Godowns & Wharf\",\n",
       "                    \"value\": [\n",
       "                        \"113.259118\",\n",
       "                        \"23.094555\",\n",
       "                        \"316\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u589e\\u57ce\\u8354\\u679d\\u6587\\u5316\\u6751Zengcheng Lichee Wenhuacun\",\n",
       "                    \"value\": [\n",
       "                        \"113.571118\",\n",
       "                        \"23.132204\",\n",
       "                        \"43\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5e7f\\u5dde\\u65c5\\u6e38\\u666f\\u70b9\\u6d9f\\u6f2a\\u6563\\u70b9\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"\\u5e7f\\u5dde\",\n",
       "        \"roam\": true,\n",
       "        \"aspectScale\": 0.75,\n",
       "        \"nameProperty\": \"name\",\n",
       "        \"selectedMode\": false,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_1087777ac0f045bc90722c05bdfd49a6.setOption(option_1087777ac0f045bc90722c05bdfd49a6);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11ed4f40>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "guangzhousandian()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "fd867520",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>125</th>\n",
       "      <td>31.2441202296</td>\n",
       "      <td>121.4996049926</td>\n",
       "      <td>黄浦江Huangpu River</td>\n",
       "      <td>54</td>\n",
       "      <td>1008</td>\n",
       "      <td>上海景点排名第101</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>31.2271646118</td>\n",
       "      <td>121.4812442093</td>\n",
       "      <td>新天地Xintiandi</td>\n",
       "      <td>3</td>\n",
       "      <td>1408</td>\n",
       "      <td>上海景点排名第59</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>31.148267</td>\n",
       "      <td>121.671964</td>\n",
       "      <td>上海迪士尼度假区Shanghai Disney Resort</td>\n",
       "      <td>70</td>\n",
       "      <td>33377</td>\n",
       "      <td>上海景点排名第1</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78</th>\n",
       "      <td>31.402877</td>\n",
       "      <td>121.514813</td>\n",
       "      <td>吴淞炮台湾湿地森林公园Wusong Cannon Bay Forest Wetland Park</td>\n",
       "      <td>1</td>\n",
       "      <td>408</td>\n",
       "      <td>上海景点排名第305</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113</th>\n",
       "      <td>31.113177</td>\n",
       "      <td>121.060143</td>\n",
       "      <td>大清邮局Zhujiajiao Post Office</td>\n",
       "      <td>2</td>\n",
       "      <td>143</td>\n",
       "      <td>上海景点排名第4</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106</th>\n",
       "      <td>31.2203578949</td>\n",
       "      <td>121.4875332464</td>\n",
       "      <td>肇周路Zhaozhou Road</td>\n",
       "      <td>0</td>\n",
       "      <td>42</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>31.723174</td>\n",
       "      <td>121.516457</td>\n",
       "      <td>海上花岛生态度假村Qianwei Ecological Village</td>\n",
       "      <td>1</td>\n",
       "      <td>111</td>\n",
       "      <td>上海景点排名第2</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>31.064508</td>\n",
       "      <td>121.014809</td>\n",
       "      <td>青西郊野公园Qingxi Country Park</td>\n",
       "      <td>1</td>\n",
       "      <td>107</td>\n",
       "      <td>上海景点排名第2383</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>31.395217</td>\n",
       "      <td>121.284467</td>\n",
       "      <td>小灶村体验农场Xiaozaocun Tiyan Farm</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>31.1211662292</td>\n",
       "      <td>120.9303197004</td>\n",
       "      <td>商榻古镇Shangta Ancient Town</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>上海景点排名第2158</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               lat             lng  \\\n",
       "125  31.2441202296  121.4996049926   \n",
       "43   31.2271646118  121.4812442093   \n",
       "0        31.148267      121.671964   \n",
       "78       31.402877      121.514813   \n",
       "113      31.113177      121.060143   \n",
       "..             ...             ...   \n",
       "106  31.2203578949  121.4875332464   \n",
       "55       31.723174      121.516457   \n",
       "54       31.064508      121.014809   \n",
       "52       31.395217      121.284467   \n",
       "199  31.1211662292  120.9303197004   \n",
       "\n",
       "                                                 景点名称 攻略提到数量   点评数量  \\\n",
       "125                                  黄浦江Huangpu River     54   1008   \n",
       "43                                       新天地Xintiandi      3   1408   \n",
       "0                      上海迪士尼度假区Shanghai Disney Resort     70  33377   \n",
       "78   吴淞炮台湾湿地森林公园Wusong Cannon Bay Forest Wetland Park      1    408   \n",
       "113                        大清邮局Zhujiajiao Post Office      2    143   \n",
       "..                                                ...    ...    ...   \n",
       "106                                  肇周路Zhaozhou Road      0     42   \n",
       "55                海上花岛生态度假村Qianwei Ecological Village      1    111   \n",
       "54                          青西郊野公园Qingxi Country Park      1    107   \n",
       "52                       小灶村体验农场Xiaozaocun Tiyan Farm      0      5   \n",
       "199                          商榻古镇Shangta Ancient Town      1     10   \n",
       "\n",
       "            景点排名   星级  \n",
       "125   上海景点排名第101  98%  \n",
       "43     上海景点排名第59  98%  \n",
       "0       上海景点排名第1  96%  \n",
       "78    上海景点排名第305  96%  \n",
       "113     上海景点排名第4  96%  \n",
       "..           ...  ...  \n",
       "106                0%  \n",
       "55      上海景点排名第2   0%  \n",
       "54   上海景点排名第2383   0%  \n",
       "52                 0%  \n",
       "199  上海景点排名第2158   0%  \n",
       "\n",
       "[200 rows x 7 columns]"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "urllst = []\n",
    "ui = 'https://travel.qunar.com/p-cs299878-shanghai-jingdian-1-'\n",
    "for i in range(1,21):\n",
    "    urllst.append(ui +str(i))\n",
    "\n",
    "    \n",
    "#访问页面加解析\n",
    "# 初步访问页面\n",
    "u1 = urllst[1]\n",
    "r = requests.get(u1)\n",
    "soup = BeautifulSoup(r.text, 'lxml')\n",
    "ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "li = ul.find_all('li')\n",
    "li1 = li[0]\n",
    "# 筛选第一个数据\n",
    "dic = {}\n",
    "dic['lat'] = li1['data-lat']\n",
    "dic['lng'] = li1['data-lng']\n",
    "dic['景点名称'] = li1.find('span',class_=\"cn_tit\").text\n",
    "dic['攻略提到数量'] = li1.find('div',class_=\"strategy_sum\").text\n",
    "dic['点评数量'] = li1.find('div',class_=\"comment_sum\").text\n",
    "dic['景点排名'] = li1.find('span',class_=\"ranking_sum\").text\n",
    "dic['星级'] = li1.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "# 标签识别\n",
    "\n",
    "datai = []\n",
    "n=0\n",
    "for i in li:\n",
    "    n+=1\n",
    "    dic = {}\n",
    "    dic['lat'] = i['data-lat']\n",
    "    dic['lng'] = i['data-lng']\n",
    "    dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "    dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "    dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "    dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "    dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "    datai.append(dic)\n",
    "# 分别获取字段内容\n",
    "        \n",
    "datai[:2]\n",
    "datai = []\n",
    "n=0\n",
    "for ui in urllst:\n",
    "    r = requests.get(ui)\n",
    "    soup = BeautifulSoup(r.text, 'lxml')\n",
    "        # 访问数据\n",
    "    ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "    li = ul.find_all('li')\n",
    "        # 解析标签\n",
    "    for i in li:\n",
    "        n+=1\n",
    "        dic = {}\n",
    "        dic['lat'] = i['data-lat']\n",
    "        dic['lng'] = i['data-lng']\n",
    "        dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "        dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "        dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "        dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "        dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "        datai.append(dic)\n",
    "        #print('成功采集%i条数据' % n)\n",
    "        # 分别获取字段内容\n",
    "datai[:5]\n",
    "\n",
    "df = pd.DataFrame(datai)\n",
    "df.sort_values('星级',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "262f8aa9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "      <th>rn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>31.148267</td>\n",
       "      <td>121.671964</td>\n",
       "      <td>上海迪士尼度假区Shanghai Disney Resort</td>\n",
       "      <td>70</td>\n",
       "      <td>33377</td>\n",
       "      <td>上海景点排名第1</td>\n",
       "      <td>96%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>31.246459</td>\n",
       "      <td>121.508642</td>\n",
       "      <td>上海海洋水族馆Shanghai Ocean Aquarium</td>\n",
       "      <td>16</td>\n",
       "      <td>5247</td>\n",
       "      <td>上海景点排名第1</td>\n",
       "      <td>86%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>31.52401</td>\n",
       "      <td>121.955977</td>\n",
       "      <td>东滩湿地公园Dongtan Wetland Park</td>\n",
       "      <td>6</td>\n",
       "      <td>522</td>\n",
       "      <td>上海景点排名第1</td>\n",
       "      <td>76%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>31.040178</td>\n",
       "      <td>121.204571</td>\n",
       "      <td>泰晤士小镇Thames Town</td>\n",
       "      <td>6</td>\n",
       "      <td>993</td>\n",
       "      <td>上海景点排名第1</td>\n",
       "      <td>88%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>31.1159338962</td>\n",
       "      <td>121.0603616306</td>\n",
       "      <td>朱家角古镇景区Zhujiajiao Ancient Town Scenic Area</td>\n",
       "      <td>9</td>\n",
       "      <td>2447</td>\n",
       "      <td>上海景点排名第1</td>\n",
       "      <td>88%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>31.2453018761</td>\n",
       "      <td>121.5064146572</td>\n",
       "      <td>东方明珠Oriental Pearl Radio &amp; Television Tower</td>\n",
       "      <td>215</td>\n",
       "      <td>47397</td>\n",
       "      <td>上海景点排名第1</td>\n",
       "      <td>90%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>31.145926</td>\n",
       "      <td>121.668349</td>\n",
       "      <td>迪士尼小镇Disneytown</td>\n",
       "      <td>16</td>\n",
       "      <td>1172</td>\n",
       "      <td>上海景点排名第2</td>\n",
       "      <td>90%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>31.016544</td>\n",
       "      <td>121.319246</td>\n",
       "      <td>上海影视乐园Shanghai Film Park</td>\n",
       "      <td>3</td>\n",
       "      <td>1908</td>\n",
       "      <td>上海景点排名第2</td>\n",
       "      <td>88%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>31.689489</td>\n",
       "      <td>121.486723</td>\n",
       "      <td>东平国家森林公园Dongping National Forest Park</td>\n",
       "      <td>2</td>\n",
       "      <td>1513</td>\n",
       "      <td>上海景点排名第2</td>\n",
       "      <td>88%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>31.723174</td>\n",
       "      <td>121.516457</td>\n",
       "      <td>海上花岛生态度假村Qianwei Ecological Village</td>\n",
       "      <td>1</td>\n",
       "      <td>111</td>\n",
       "      <td>上海景点排名第2</td>\n",
       "      <td>0%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>31.2391219237</td>\n",
       "      <td>121.4987359133</td>\n",
       "      <td>外滩The Bund</td>\n",
       "      <td>453</td>\n",
       "      <td>49017</td>\n",
       "      <td>上海景点排名第2</td>\n",
       "      <td>94%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>31.724771</td>\n",
       "      <td>121.5057</td>\n",
       "      <td>江南三民文化村Jiangnan Sanmin Culture Village</td>\n",
       "      <td>0</td>\n",
       "      <td>60</td>\n",
       "      <td>上海景点排名第3</td>\n",
       "      <td>70%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>31.214113</td>\n",
       "      <td>121.474974</td>\n",
       "      <td>田子坊Tianzifang</td>\n",
       "      <td>215</td>\n",
       "      <td>3420</td>\n",
       "      <td>上海景点排名第3</td>\n",
       "      <td>88%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>31.081652</td>\n",
       "      <td>121.189078</td>\n",
       "      <td>上海辰山植物园Shanghai Chenshan Botanical Garden</td>\n",
       "      <td>2</td>\n",
       "      <td>1501</td>\n",
       "      <td>上海景点排名第3</td>\n",
       "      <td>94%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>31.231472</td>\n",
       "      <td>121.499034</td>\n",
       "      <td>上海城隍庙道观City God Temple of Shanghai</td>\n",
       "      <td>210</td>\n",
       "      <td>2108</td>\n",
       "      <td>上海景点排名第4</td>\n",
       "      <td>82%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>31.113177</td>\n",
       "      <td>121.060143</td>\n",
       "      <td>大清邮局Zhujiajiao Post Office</td>\n",
       "      <td>2</td>\n",
       "      <td>143</td>\n",
       "      <td>上海景点排名第4</td>\n",
       "      <td>96%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>31.230932</td>\n",
       "      <td>121.403475</td>\n",
       "      <td>上海长风海洋世界Changfeng Ocean World</td>\n",
       "      <td>2</td>\n",
       "      <td>2334</td>\n",
       "      <td>上海景点排名第5</td>\n",
       "      <td>76%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>31.115018</td>\n",
       "      <td>121.061898</td>\n",
       "      <td>朱家角人文艺术馆Zhujiajiao Humanities Art Gallery</td>\n",
       "      <td>1</td>\n",
       "      <td>24</td>\n",
       "      <td>上海景点排名第5</td>\n",
       "      <td>100%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>31.406121</td>\n",
       "      <td>121.720774</td>\n",
       "      <td>长兴岛郊野公园Changxing Island Country Park</td>\n",
       "      <td>1</td>\n",
       "      <td>135</td>\n",
       "      <td>上海景点排名第5</td>\n",
       "      <td>100%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>31.100768</td>\n",
       "      <td>121.201907</td>\n",
       "      <td>佘山国家森林公园Sheshan National Forest Park</td>\n",
       "      <td>2</td>\n",
       "      <td>491</td>\n",
       "      <td>上海景点排名第5</td>\n",
       "      <td>90%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>31.224611</td>\n",
       "      <td>121.547781</td>\n",
       "      <td>上海科技馆Shanghai Science and Technology Museum</td>\n",
       "      <td>28</td>\n",
       "      <td>6818</td>\n",
       "      <td>上海景点排名第6</td>\n",
       "      <td>90%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>31.7438824857</td>\n",
       "      <td>121.2634927397</td>\n",
       "      <td>西沙明珠湖景区Xisha Mingzhu Lake Park</td>\n",
       "      <td>2</td>\n",
       "      <td>237</td>\n",
       "      <td>上海景点排名第6</td>\n",
       "      <td>80%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>31.232431</td>\n",
       "      <td>121.49909</td>\n",
       "      <td>豫园Yu Garden</td>\n",
       "      <td>174</td>\n",
       "      <td>10386</td>\n",
       "      <td>上海景点排名第7</td>\n",
       "      <td>86%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>31.239657</td>\n",
       "      <td>121.51346</td>\n",
       "      <td>上海环球金融中心Shanghai World Financial Center</td>\n",
       "      <td>46</td>\n",
       "      <td>5342</td>\n",
       "      <td>上海景点排名第8</td>\n",
       "      <td>92%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>31.622923</td>\n",
       "      <td>121.408771</td>\n",
       "      <td>瀛洲公园Yingzhou Park (North Gate)</td>\n",
       "      <td>1</td>\n",
       "      <td>83</td>\n",
       "      <td>上海景点排名第8</td>\n",
       "      <td>94%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>31.06138</td>\n",
       "      <td>121.727995</td>\n",
       "      <td>上海野生动物园Shanghai Wild Animal Park</td>\n",
       "      <td>6</td>\n",
       "      <td>23148</td>\n",
       "      <td>上海景点排名第9</td>\n",
       "      <td>90%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>31.239168</td>\n",
       "      <td>121.512</td>\n",
       "      <td>上海中心大厦Shanghai Tower</td>\n",
       "      <td>7</td>\n",
       "      <td>559</td>\n",
       "      <td>上海景点排名第9</td>\n",
       "      <td>94%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              lat             lng  \\\n",
       "0       31.148267      121.671964   \n",
       "1       31.246459      121.508642   \n",
       "2        31.52401      121.955977   \n",
       "3       31.040178      121.204571   \n",
       "4   31.1159338962  121.0603616306   \n",
       "5   31.2453018761  121.5064146572   \n",
       "6       31.145926      121.668349   \n",
       "7       31.016544      121.319246   \n",
       "8       31.689489      121.486723   \n",
       "9       31.723174      121.516457   \n",
       "10  31.2391219237  121.4987359133   \n",
       "11      31.724771        121.5057   \n",
       "12      31.214113      121.474974   \n",
       "13      31.081652      121.189078   \n",
       "14      31.231472      121.499034   \n",
       "15      31.113177      121.060143   \n",
       "16      31.230932      121.403475   \n",
       "17      31.115018      121.061898   \n",
       "18      31.406121      121.720774   \n",
       "19      31.100768      121.201907   \n",
       "20      31.224611      121.547781   \n",
       "21  31.7438824857  121.2634927397   \n",
       "22      31.232431       121.49909   \n",
       "23      31.239657       121.51346   \n",
       "24      31.622923      121.408771   \n",
       "25       31.06138      121.727995   \n",
       "26      31.239168         121.512   \n",
       "\n",
       "                                           景点名称 攻略提到数量   点评数量      景点排名    星级  \\\n",
       "0                上海迪士尼度假区Shanghai Disney Resort     70  33377  上海景点排名第1   96%   \n",
       "1                上海海洋水族馆Shanghai Ocean Aquarium     16   5247  上海景点排名第1   86%   \n",
       "2                    东滩湿地公园Dongtan Wetland Park      6    522  上海景点排名第1   76%   \n",
       "3                              泰晤士小镇Thames Town      6    993  上海景点排名第1   88%   \n",
       "4    朱家角古镇景区Zhujiajiao Ancient Town Scenic Area      9   2447  上海景点排名第1   88%   \n",
       "5   东方明珠Oriental Pearl Radio & Television Tower    215  47397  上海景点排名第1   90%   \n",
       "6                               迪士尼小镇Disneytown     16   1172  上海景点排名第2   90%   \n",
       "7                      上海影视乐园Shanghai Film Park      3   1908  上海景点排名第2   88%   \n",
       "8         东平国家森林公园Dongping National Forest Park      2   1513  上海景点排名第2   88%   \n",
       "9           海上花岛生态度假村Qianwei Ecological Village      1    111  上海景点排名第2    0%   \n",
       "10                                   外滩The Bund    453  49017  上海景点排名第2   94%   \n",
       "11       江南三民文化村Jiangnan Sanmin Culture Village      0     60  上海景点排名第3   70%   \n",
       "12                                田子坊Tianzifang    215   3420  上海景点排名第3   88%   \n",
       "13    上海辰山植物园Shanghai Chenshan Botanical Garden      2   1501  上海景点排名第3   94%   \n",
       "14           上海城隍庙道观City God Temple of Shanghai    210   2108  上海景点排名第4   82%   \n",
       "15                   大清邮局Zhujiajiao Post Office      2    143  上海景点排名第4   96%   \n",
       "16                上海长风海洋世界Changfeng Ocean World      2   2334  上海景点排名第5   76%   \n",
       "17    朱家角人文艺术馆Zhujiajiao Humanities Art Gallery      1     24  上海景点排名第5  100%   \n",
       "18         长兴岛郊野公园Changxing Island Country Park      1    135  上海景点排名第5  100%   \n",
       "19         佘山国家森林公园Sheshan National Forest Park      2    491  上海景点排名第5   90%   \n",
       "20  上海科技馆Shanghai Science and Technology Museum     28   6818  上海景点排名第6   90%   \n",
       "21               西沙明珠湖景区Xisha Mingzhu Lake Park      2    237  上海景点排名第6   80%   \n",
       "22                                  豫园Yu Garden    174  10386  上海景点排名第7   86%   \n",
       "23      上海环球金融中心Shanghai World Financial Center     46   5342  上海景点排名第8   92%   \n",
       "24               瀛洲公园Yingzhou Park (North Gate)      1     83  上海景点排名第8   94%   \n",
       "25             上海野生动物园Shanghai Wild Animal Park      6  23148  上海景点排名第9   90%   \n",
       "26                         上海中心大厦Shanghai Tower      7    559  上海景点排名第9   94%   \n",
       "\n",
       "    rn  \n",
       "0    1  \n",
       "1    1  \n",
       "2    1  \n",
       "3    1  \n",
       "4    1  \n",
       "5    1  \n",
       "6    2  \n",
       "7    2  \n",
       "8    2  \n",
       "9    2  \n",
       "10   2  \n",
       "11   3  \n",
       "12   3  \n",
       "13   3  \n",
       "14   4  \n",
       "15   4  \n",
       "16   5  \n",
       "17   5  \n",
       "18   5  \n",
       "19   5  \n",
       "20   6  \n",
       "21   6  \n",
       "22   7  \n",
       "23   8  \n",
       "24   8  \n",
       "25   9  \n",
       "26   9  "
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['景点排名'].replace('',np.nan,inplace=True)\n",
    "df.dropna(subset=['景点排名'], inplace=True)\n",
    "df['rn']=df['景点排名'].apply(lambda x:int(re.sub(\"\\D\",\"\",x)))\n",
    "dat=df.sort_values('rn')\n",
    "db=dat[dat['rn']<10]\n",
    "db.reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "451970c4",
   "metadata": {},
   "outputs": [],
   "source": [
    "fen=[db.iloc[i]['景点名称']for i in range(db.shape[0])]\n",
    "lng=[db.iloc[i]['lng'] for i in range(db.shape[0])]\n",
    "lat=[db.iloc[i]['lat'] for i in range(db.shape[0])]\n",
    "value=[db.iloc[i]['点评数量'] for i in range(db.shape[0])]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "7292526e",
   "metadata": {},
   "outputs": [],
   "source": [
    "def shanghaisandian():\n",
    "    def geo_add_custom_coordinate():\n",
    "        geo = Geo(init_opts=opts.InitOpts(theme='light',\n",
    "                                      width='1000px',\n",
    "                                      height='600px',\n",
    "                                      bg_color = '#EEEEE8'))\n",
    "        for i in range(len(db)):\n",
    "                geo.add_coordinate(fen[i], lng[i],lat[i])\n",
    "                geo.add_schema(maptype=\"上海\")\n",
    "                # 为自定义的点添加属性\n",
    "                geo.add(\"\",[(fen[i], value[i])],type_='effectScatter')#type_='heatmap' 热力图 #type_='effectScatter' 涟漪散点图\n",
    "                geo.set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "                geo.set_global_opts(title_opts=opts.TitleOpts(title=\"上海旅游景点涟漪散点图\"),visualmap_opts=opts.VisualMapOpts())\n",
    "        return geo\n",
    "    chart = geo_add_custom_coordinate()\n",
    "    chart.render_notebook()\n",
    "    h=chart.render_notebook()\n",
    "    return h"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "750302c7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '上海':'https://assets.pyecharts.org/assets/maps/shanghai'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"2254cdb4cd7b44bcb669a47acb590559\" style=\"width:1000px; height:600px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '上海'], function(echarts) {\n",
       "                var chart_2254cdb4cd7b44bcb669a47acb590559 = echarts.init(\n",
       "                    document.getElementById('2254cdb4cd7b44bcb669a47acb590559'), 'light', {renderer: 'canvas'});\n",
       "                var option_2254cdb4cd7b44bcb669a47acb590559 = {\n",
       "    \"backgroundColor\": \"#EEEEE8\",\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u8fea\\u58eb\\u5c3c\\u5ea6\\u5047\\u533aShanghai Disney Resort\",\n",
       "                    \"value\": [\n",
       "                        \"121.671964\",\n",
       "                        \"31.148267\",\n",
       "                        \"33377\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u6d77\\u6d0b\\u6c34\\u65cf\\u9986Shanghai Ocean Aquarium\",\n",
       "                    \"value\": [\n",
       "                        \"121.508642\",\n",
       "                        \"31.246459\",\n",
       "                        \"5247\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u6ee9\\u6e7f\\u5730\\u516c\\u56edDongtan Wetland Park\",\n",
       "                    \"value\": [\n",
       "                        \"121.955977\",\n",
       "                        \"31.52401\",\n",
       "                        \"522\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6cf0\\u6664\\u58eb\\u5c0f\\u9547Thames Town\",\n",
       "                    \"value\": [\n",
       "                        \"121.204571\",\n",
       "                        \"31.040178\",\n",
       "                        \"993\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6731\\u5bb6\\u89d2\\u53e4\\u9547\\u666f\\u533aZhujiajiao Ancient Town Scenic Area\",\n",
       "                    \"value\": [\n",
       "                        \"121.0603616306\",\n",
       "                        \"31.1159338962\",\n",
       "                        \"2447\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u65b9\\u660e\\u73e0Oriental Pearl Radio & Television Tower\",\n",
       "                    \"value\": [\n",
       "                        \"121.5064146572\",\n",
       "                        \"31.2453018761\",\n",
       "                        \"47397\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8fea\\u58eb\\u5c3c\\u5c0f\\u9547Disneytown\",\n",
       "                    \"value\": [\n",
       "                        \"121.668349\",\n",
       "                        \"31.145926\",\n",
       "                        \"1172\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u5f71\\u89c6\\u4e50\\u56edShanghai Film Park\",\n",
       "                    \"value\": [\n",
       "                        \"121.319246\",\n",
       "                        \"31.016544\",\n",
       "                        \"1908\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u5e73\\u56fd\\u5bb6\\u68ee\\u6797\\u516c\\u56edDongping National Forest Park\",\n",
       "                    \"value\": [\n",
       "                        \"121.486723\",\n",
       "                        \"31.689489\",\n",
       "                        \"1513\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u4e0a\\u82b1\\u5c9b\\u751f\\u6001\\u5ea6\\u5047\\u6751Qianwei Ecological Village\",\n",
       "                    \"value\": [\n",
       "                        \"121.516457\",\n",
       "                        \"31.723174\",\n",
       "                        \"111\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5916\\u6ee9The Bund\",\n",
       "                    \"value\": [\n",
       "                        \"121.4987359133\",\n",
       "                        \"31.2391219237\",\n",
       "                        \"49017\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u5357\\u4e09\\u6c11\\u6587\\u5316\\u6751Jiangnan Sanmin Culture Village\",\n",
       "                    \"value\": [\n",
       "                        \"121.5057\",\n",
       "                        \"31.724771\",\n",
       "                        \"60\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7530\\u5b50\\u574aTianzifang\",\n",
       "                    \"value\": [\n",
       "                        \"121.474974\",\n",
       "                        \"31.214113\",\n",
       "                        \"3420\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u8fb0\\u5c71\\u690d\\u7269\\u56edShanghai Chenshan Botanical Garden\",\n",
       "                    \"value\": [\n",
       "                        \"121.189078\",\n",
       "                        \"31.081652\",\n",
       "                        \"1501\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u57ce\\u968d\\u5e99\\u9053\\u89c2City God Temple of Shanghai\",\n",
       "                    \"value\": [\n",
       "                        \"121.499034\",\n",
       "                        \"31.231472\",\n",
       "                        \"2108\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u6e05\\u90ae\\u5c40Zhujiajiao Post Office\",\n",
       "                    \"value\": [\n",
       "                        \"121.060143\",\n",
       "                        \"31.113177\",\n",
       "                        \"143\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u957f\\u98ce\\u6d77\\u6d0b\\u4e16\\u754cChangfeng Ocean World\",\n",
       "                    \"value\": [\n",
       "                        \"121.403475\",\n",
       "                        \"31.230932\",\n",
       "                        \"2334\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6731\\u5bb6\\u89d2\\u4eba\\u6587\\u827a\\u672f\\u9986Zhujiajiao Humanities Art Gallery\",\n",
       "                    \"value\": [\n",
       "                        \"121.061898\",\n",
       "                        \"31.115018\",\n",
       "                        \"24\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u5174\\u5c9b\\u90ca\\u91ce\\u516c\\u56edChangxing Island Country Park\",\n",
       "                    \"value\": [\n",
       "                        \"121.720774\",\n",
       "                        \"31.406121\",\n",
       "                        \"135\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4f58\\u5c71\\u56fd\\u5bb6\\u68ee\\u6797\\u516c\\u56edSheshan National Forest Park\",\n",
       "                    \"value\": [\n",
       "                        \"121.201907\",\n",
       "                        \"31.100768\",\n",
       "                        \"491\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u79d1\\u6280\\u9986Shanghai Science and Technology Museum\",\n",
       "                    \"value\": [\n",
       "                        \"121.547781\",\n",
       "                        \"31.224611\",\n",
       "                        \"6818\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u6c99\\u660e\\u73e0\\u6e56\\u666f\\u533aXisha Mingzhu Lake Park\",\n",
       "                    \"value\": [\n",
       "                        \"121.2634927397\",\n",
       "                        \"31.7438824857\",\n",
       "                        \"237\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8c6b\\u56edYu Garden\",\n",
       "                    \"value\": [\n",
       "                        \"121.49909\",\n",
       "                        \"31.232431\",\n",
       "                        \"10386\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u73af\\u7403\\u91d1\\u878d\\u4e2d\\u5fc3Shanghai World Financial Center\",\n",
       "                    \"value\": [\n",
       "                        \"121.51346\",\n",
       "                        \"31.239657\",\n",
       "                        \"5342\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u701b\\u6d32\\u516c\\u56edYingzhou Park (North Gate)\",\n",
       "                    \"value\": [\n",
       "                        \"121.408771\",\n",
       "                        \"31.622923\",\n",
       "                        \"83\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u91ce\\u751f\\u52a8\\u7269\\u56edShanghai Wild Animal Park\",\n",
       "                    \"value\": [\n",
       "                        \"121.727995\",\n",
       "                        \"31.06138\",\n",
       "                        \"23148\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u4e2d\\u5fc3\\u5927\\u53a6Shanghai Tower\",\n",
       "                    \"value\": [\n",
       "                        \"121.512\",\n",
       "                        \"31.239168\",\n",
       "                        \"559\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e0a\\u6d77\\u65c5\\u6e38\\u666f\\u70b9\\u6d9f\\u6f2a\\u6563\\u70b9\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"\\u4e0a\\u6d77\",\n",
       "        \"roam\": true,\n",
       "        \"aspectScale\": 0.75,\n",
       "        \"nameProperty\": \"name\",\n",
       "        \"selectedMode\": false,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_2254cdb4cd7b44bcb669a47acb590559.setOption(option_2254cdb4cd7b44bcb669a47acb590559);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x1458f088>"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "shanghaisandian()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "c92e4448",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>34.389432</td>\n",
       "      <td>109.284897</td>\n",
       "      <td>兵马俑一号坑</td>\n",
       "      <td>7</td>\n",
       "      <td>15</td>\n",
       "      <td>西安景点排名第38</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>34.031609</td>\n",
       "      <td>108.798559</td>\n",
       "      <td>古观音禅寺Guguanyinchan Temple</td>\n",
       "      <td>2</td>\n",
       "      <td>48</td>\n",
       "      <td>西安景点排名第65</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>34.497645</td>\n",
       "      <td>110.073018</td>\n",
       "      <td>华山Mount Hua</td>\n",
       "      <td>75</td>\n",
       "      <td>10334</td>\n",
       "      <td>华阴景点排名第1</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>126</th>\n",
       "      <td>34.019776875</td>\n",
       "      <td>108.7505289486</td>\n",
       "      <td>草堂寺Caotang Temple</td>\n",
       "      <td>1</td>\n",
       "      <td>48</td>\n",
       "      <td>西安景点排名第5</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>168</th>\n",
       "      <td>34.250383</td>\n",
       "      <td>108.921892</td>\n",
       "      <td>西北工业大学Xibeigongye University</td>\n",
       "      <td>3</td>\n",
       "      <td>46</td>\n",
       "      <td>西安景点排名第144</td>\n",
       "      <td>94%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>133</th>\n",
       "      <td>34.227912</td>\n",
       "      <td>108.954212</td>\n",
       "      <td>踏雪阁汉服体验馆(小寨华旗店)</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>132</th>\n",
       "      <td>34.1482981413</td>\n",
       "      <td>108.919471413</td>\n",
       "      <td>长安公园Chang’an Park</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>131</th>\n",
       "      <td>34.3418730319</td>\n",
       "      <td>109.0459630367</td>\n",
       "      <td>西安国际会展中心Xi'an International Convention and Exh...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121</th>\n",
       "      <td>34.009875</td>\n",
       "      <td>108.720208</td>\n",
       "      <td>太平峪山口</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>34.23546</td>\n",
       "      <td>108.902681</td>\n",
       "      <td>新纪元公园Xinjiyuan Park （West Gate）</td>\n",
       "      <td>0</td>\n",
       "      <td>19</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               lat             lng  \\\n",
       "40       34.389432      109.284897   \n",
       "74       34.031609      108.798559   \n",
       "0        34.497645      110.073018   \n",
       "126   34.019776875  108.7505289486   \n",
       "168      34.250383      108.921892   \n",
       "..             ...             ...   \n",
       "133      34.227912      108.954212   \n",
       "132  34.1482981413   108.919471413   \n",
       "131  34.3418730319  109.0459630367   \n",
       "121      34.009875      108.720208   \n",
       "199       34.23546      108.902681   \n",
       "\n",
       "                                                  景点名称 攻略提到数量   点评数量  \\\n",
       "40                                              兵马俑一号坑      7     15   \n",
       "74                           古观音禅寺Guguanyinchan Temple      2     48   \n",
       "0                                          华山Mount Hua     75  10334   \n",
       "126                                  草堂寺Caotang Temple      1     48   \n",
       "168                       西北工业大学Xibeigongye University      3     46   \n",
       "..                                                 ...    ...    ...   \n",
       "133                                    踏雪阁汉服体验馆(小寨华旗店)      0      0   \n",
       "132                                  长安公园Chang’an Park      0      1   \n",
       "131  西安国际会展中心Xi'an International Convention and Exh...      0      0   \n",
       "121                                              太平峪山口      0      0   \n",
       "199                    新纪元公园Xinjiyuan Park （West Gate）      0     19   \n",
       "\n",
       "           景点排名   星级  \n",
       "40    西安景点排名第38  98%  \n",
       "74    西安景点排名第65  98%  \n",
       "0      华阴景点排名第1  96%  \n",
       "126    西安景点排名第5  96%  \n",
       "168  西安景点排名第144  94%  \n",
       "..          ...  ...  \n",
       "133               0%  \n",
       "132               0%  \n",
       "131               0%  \n",
       "121               0%  \n",
       "199               0%  \n",
       "\n",
       "[200 rows x 7 columns]"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "urllst = []\n",
    "ui = 'https://travel.qunar.com/p-cs300100-xian-jingdian-1-'\n",
    "for i in range(1,21):\n",
    "    urllst.append(ui +str(i))\n",
    "\n",
    "    \n",
    "#访问页面加解析\n",
    "# 初步访问页面\n",
    "u1 = urllst[1]\n",
    "r = requests.get(u1)\n",
    "soup = BeautifulSoup(r.text, 'lxml')\n",
    "ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "li = ul.find_all('li')\n",
    "li1 = li[0]\n",
    "# 筛选第一个数据\n",
    "dic = {}\n",
    "dic['lat'] = li1['data-lat']\n",
    "dic['lng'] = li1['data-lng']\n",
    "dic['景点名称'] = li1.find('span',class_=\"cn_tit\").text\n",
    "dic['攻略提到数量'] = li1.find('div',class_=\"strategy_sum\").text\n",
    "dic['点评数量'] = li1.find('div',class_=\"comment_sum\").text\n",
    "dic['景点排名'] = li1.find('span',class_=\"ranking_sum\").text\n",
    "dic['星级'] = li1.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "# 标签识别\n",
    "\n",
    "datai = []\n",
    "n=0\n",
    "for i in li:\n",
    "    n+=1\n",
    "    dic = {}\n",
    "    dic['lat'] = i['data-lat']\n",
    "    dic['lng'] = i['data-lng']\n",
    "    dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "    dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "    dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "    dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "    dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "    datai.append(dic)\n",
    "# 分别获取字段内容\n",
    "        \n",
    "datai[:2]\n",
    "datai = []\n",
    "n=0\n",
    "for ui in urllst:\n",
    "    r = requests.get(ui)\n",
    "    soup = BeautifulSoup(r.text, 'lxml')\n",
    "        # 访问数据\n",
    "    ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "    li = ul.find_all('li')\n",
    "        # 解析标签\n",
    "    for i in li:\n",
    "        n+=1\n",
    "        dic = {}\n",
    "        dic['lat'] = i['data-lat']\n",
    "        dic['lng'] = i['data-lng']\n",
    "        dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "        dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "        dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "        dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "        dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "        datai.append(dic)\n",
    "        #print('成功采集%i条数据' % n)\n",
    "        # 分别获取字段内容\n",
    "datai[:5]\n",
    "\n",
    "df = pd.DataFrame(datai)\n",
    "df.sort_values('星级',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "9e14cf76",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "      <th>rn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>34.497645</td>\n",
       "      <td>110.073018</td>\n",
       "      <td>华山Mount Hua</td>\n",
       "      <td>75</td>\n",
       "      <td>10334</td>\n",
       "      <td>华阴景点排名第1</td>\n",
       "      <td>96%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>34.126918</td>\n",
       "      <td>108.504052</td>\n",
       "      <td>活死人墓Tomb of the Living Dead</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "      <td>西安景点排名第1</td>\n",
       "      <td>60%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>34.0733875136</td>\n",
       "      <td>108.3677360986</td>\n",
       "      <td>秦岭国家植物园Qinling National Botanical Garden</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>周至景点排名第1</td>\n",
       "      <td>70%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>34.26682</td>\n",
       "      <td>108.950131</td>\n",
       "      <td>回民街Muslim Quarter</td>\n",
       "      <td>523</td>\n",
       "      <td>12745</td>\n",
       "      <td>西安景点排名第1</td>\n",
       "      <td>86%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>34.389417</td>\n",
       "      <td>109.2851</td>\n",
       "      <td>秦始皇帝陵博物院(兵马俑)Emperor Qinshihuang's Mausoleum S...</td>\n",
       "      <td>512</td>\n",
       "      <td>19596</td>\n",
       "      <td>西安景点排名第1</td>\n",
       "      <td>92%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>34.219076</td>\n",
       "      <td>108.981465</td>\n",
       "      <td>大唐芙蓉园Tang Dynasty Furong Garden</td>\n",
       "      <td>216</td>\n",
       "      <td>5392</td>\n",
       "      <td>西安景点排名第2</td>\n",
       "      <td>82%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>33.98677</td>\n",
       "      <td>108.692697</td>\n",
       "      <td>圭峰山Guifeng Mountain</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>西安景点排名第2</td>\n",
       "      <td>0%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>34.230567</td>\n",
       "      <td>108.961523</td>\n",
       "      <td>陕西历史博物馆Shaanxi History Museum</td>\n",
       "      <td>326</td>\n",
       "      <td>9698</td>\n",
       "      <td>西安景点排名第3</td>\n",
       "      <td>92%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>34.0585449447</td>\n",
       "      <td>108.3365914964</td>\n",
       "      <td>楼观台国家森林公园Louguantai National Forest Park</td>\n",
       "      <td>1</td>\n",
       "      <td>109</td>\n",
       "      <td>周至景点排名第3</td>\n",
       "      <td>74%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>34.078546</td>\n",
       "      <td>109.282525</td>\n",
       "      <td>白鹿原影视城Bailuyuan Film City</td>\n",
       "      <td>1</td>\n",
       "      <td>240</td>\n",
       "      <td>蓝田景点排名第3</td>\n",
       "      <td>90%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>34.224579</td>\n",
       "      <td>108.970602</td>\n",
       "      <td>大雁塔Giant Wild Goose Pagoda</td>\n",
       "      <td>423</td>\n",
       "      <td>4225</td>\n",
       "      <td>西安景点排名第4</td>\n",
       "      <td>88%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>34.080217</td>\n",
       "      <td>108.349119</td>\n",
       "      <td>赵公明文化景区Zhaogongming Culture Sceneic Area</td>\n",
       "      <td>1</td>\n",
       "      <td>101</td>\n",
       "      <td>周至景点排名第4</td>\n",
       "      <td>72%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>33.913412</td>\n",
       "      <td>108.651342</td>\n",
       "      <td>太平国家森林公园Taiping National Forest Park</td>\n",
       "      <td>2</td>\n",
       "      <td>279</td>\n",
       "      <td>西安景点排名第4</td>\n",
       "      <td>90%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>34.363989</td>\n",
       "      <td>109.222908</td>\n",
       "      <td>华清宫Huaqing Pool</td>\n",
       "      <td>273</td>\n",
       "      <td>8995</td>\n",
       "      <td>西安景点排名第5</td>\n",
       "      <td>84%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>34.227547</td>\n",
       "      <td>108.970574</td>\n",
       "      <td>大雁塔北广场音乐喷泉Big Wild Goose Pagoda North Square M...</td>\n",
       "      <td>79</td>\n",
       "      <td>904</td>\n",
       "      <td>西安景点排名第5</td>\n",
       "      <td>86%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>34.019776875</td>\n",
       "      <td>108.7505289486</td>\n",
       "      <td>草堂寺Caotang Temple</td>\n",
       "      <td>1</td>\n",
       "      <td>48</td>\n",
       "      <td>西安景点排名第5</td>\n",
       "      <td>96%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>34.257907</td>\n",
       "      <td>108.954666</td>\n",
       "      <td>西安城墙Fortifications of Xi'an</td>\n",
       "      <td>367</td>\n",
       "      <td>7726</td>\n",
       "      <td>西安景点排名第6</td>\n",
       "      <td>90%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>34.079634</td>\n",
       "      <td>109.456433</td>\n",
       "      <td>玉山蓝河风景区Yushanlanhe Sceneic Area</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>蓝田景点排名第6</td>\n",
       "      <td>0%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>34.370615</td>\n",
       "      <td>109.217941</td>\n",
       "      <td>芙蓉园Furong Garden</td>\n",
       "      <td>1</td>\n",
       "      <td>47</td>\n",
       "      <td>西安景点排名第7</td>\n",
       "      <td>100%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>34.298594</td>\n",
       "      <td>108.969567</td>\n",
       "      <td>大明宫国家遗址公园Daming Palace National Heritage Park</td>\n",
       "      <td>62</td>\n",
       "      <td>1799</td>\n",
       "      <td>西安景点排名第7</td>\n",
       "      <td>78%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>34.260436</td>\n",
       "      <td>108.95035</td>\n",
       "      <td>德福巷Defu Lane</td>\n",
       "      <td>7</td>\n",
       "      <td>160</td>\n",
       "      <td>西安景点排名第8</td>\n",
       "      <td>82%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>34.168254</td>\n",
       "      <td>108.208751</td>\n",
       "      <td>周至老县城Zhouzhi Old Country</td>\n",
       "      <td>0</td>\n",
       "      <td>18</td>\n",
       "      <td>周至景点排名第9</td>\n",
       "      <td>0%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>34.268983</td>\n",
       "      <td>108.949711</td>\n",
       "      <td>高家大院Gaojia Courtyard</td>\n",
       "      <td>79</td>\n",
       "      <td>754</td>\n",
       "      <td>西安景点排名第9</td>\n",
       "      <td>78%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              lat             lng  \\\n",
       "0       34.497645      110.073018   \n",
       "1       34.126918      108.504052   \n",
       "2   34.0733875136  108.3677360986   \n",
       "3        34.26682      108.950131   \n",
       "4       34.389417        109.2851   \n",
       "5       34.219076      108.981465   \n",
       "6        33.98677      108.692697   \n",
       "7       34.230567      108.961523   \n",
       "8   34.0585449447  108.3365914964   \n",
       "9       34.078546      109.282525   \n",
       "10      34.224579      108.970602   \n",
       "11      34.080217      108.349119   \n",
       "12      33.913412      108.651342   \n",
       "13      34.363989      109.222908   \n",
       "14      34.227547      108.970574   \n",
       "15   34.019776875  108.7505289486   \n",
       "16      34.257907      108.954666   \n",
       "17      34.079634      109.456433   \n",
       "18      34.370615      109.217941   \n",
       "19      34.298594      108.969567   \n",
       "20      34.260436       108.95035   \n",
       "21      34.168254      108.208751   \n",
       "22      34.268983      108.949711   \n",
       "\n",
       "                                                 景点名称 攻略提到数量   点评数量      景点排名  \\\n",
       "0                                         华山Mount Hua     75  10334  华阴景点排名第1   \n",
       "1                         活死人墓Tomb of the Living Dead      0     20  西安景点排名第1   \n",
       "2            秦岭国家植物园Qinling National Botanical Garden      0     11  周至景点排名第1   \n",
       "3                                   回民街Muslim Quarter    523  12745  西安景点排名第1   \n",
       "4   秦始皇帝陵博物院(兵马俑)Emperor Qinshihuang's Mausoleum S...    512  19596  西安景点排名第1   \n",
       "5                     大唐芙蓉园Tang Dynasty Furong Garden    216   5392  西安景点排名第2   \n",
       "6                                 圭峰山Guifeng Mountain      0      4  西安景点排名第2   \n",
       "7                       陕西历史博物馆Shaanxi History Museum    326   9698  西安景点排名第3   \n",
       "8            楼观台国家森林公园Louguantai National Forest Park      1    109  周至景点排名第3   \n",
       "9                           白鹿原影视城Bailuyuan Film City      1    240  蓝田景点排名第3   \n",
       "10                         大雁塔Giant Wild Goose Pagoda    423   4225  西安景点排名第4   \n",
       "11           赵公明文化景区Zhaogongming Culture Sceneic Area      1    101  周至景点排名第4   \n",
       "12               太平国家森林公园Taiping National Forest Park      2    279  西安景点排名第4   \n",
       "13                                    华清宫Huaqing Pool    273   8995  西安景点排名第5   \n",
       "14  大雁塔北广场音乐喷泉Big Wild Goose Pagoda North Square M...     79    904  西安景点排名第5   \n",
       "15                                  草堂寺Caotang Temple      1     48  西安景点排名第5   \n",
       "16                        西安城墙Fortifications of Xi'an    367   7726  西安景点排名第6   \n",
       "17                    玉山蓝河风景区Yushanlanhe Sceneic Area      1      2  蓝田景点排名第6   \n",
       "18                                   芙蓉园Furong Garden      1     47  西安景点排名第7   \n",
       "19      大明宫国家遗址公园Daming Palace National Heritage Park     62   1799  西安景点排名第7   \n",
       "20                                       德福巷Defu Lane      7    160  西安景点排名第8   \n",
       "21                           周至老县城Zhouzhi Old Country      0     18  周至景点排名第9   \n",
       "22                               高家大院Gaojia Courtyard     79    754  西安景点排名第9   \n",
       "\n",
       "      星级  rn  \n",
       "0    96%   1  \n",
       "1    60%   1  \n",
       "2    70%   1  \n",
       "3    86%   1  \n",
       "4    92%   1  \n",
       "5    82%   2  \n",
       "6     0%   2  \n",
       "7    92%   3  \n",
       "8    74%   3  \n",
       "9    90%   3  \n",
       "10   88%   4  \n",
       "11   72%   4  \n",
       "12   90%   4  \n",
       "13   84%   5  \n",
       "14   86%   5  \n",
       "15   96%   5  \n",
       "16   90%   6  \n",
       "17    0%   6  \n",
       "18  100%   7  \n",
       "19   78%   7  \n",
       "20   82%   8  \n",
       "21    0%   9  \n",
       "22   78%   9  "
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['景点排名'].replace('',np.nan,inplace=True)\n",
    "df.dropna(subset=['景点排名'], inplace=True)\n",
    "df['rn']=df['景点排名'].apply(lambda x:int(re.sub(\"\\D\",\"\",x)))\n",
    "dat=df.sort_values('rn')\n",
    "db=dat[dat['rn']<10]\n",
    "db.reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "50e9d1e6",
   "metadata": {},
   "outputs": [],
   "source": [
    "fen=[db.iloc[i]['景点名称']for i in range(db.shape[0])]\n",
    "lng=[db.iloc[i]['lng'] for i in range(db.shape[0])]\n",
    "lat=[db.iloc[i]['lat'] for i in range(db.shape[0])]\n",
    "value=[db.iloc[i]['点评数量'] for i in range(db.shape[0])]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "9b1c98a3",
   "metadata": {},
   "outputs": [],
   "source": [
    "def xiansandian():\n",
    "    def geo_add_custom_coordinate():\n",
    "        geo = Geo(init_opts=opts.InitOpts(theme='light',\n",
    "                                      width='1000px',\n",
    "                                      height='600px',\n",
    "                                      bg_color = '#EEEEE8'))\n",
    "        for i in range(len(db)):\n",
    "                geo.add_coordinate(fen[i], lng[i],lat[i])\n",
    "                geo.add_schema(maptype=\"西安\")\n",
    "                # 为自定义的点添加属性\n",
    "                geo.add(\"\",[(fen[i], value[i])],type_='effectScatter')#type_='heatmap' 热力图 #type_='effectScatter' 涟漪散点图\n",
    "                geo.set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "                geo.set_global_opts(title_opts=opts.TitleOpts(title=\"西安旅游景点涟漪散点图\"),visualmap_opts=opts.VisualMapOpts())\n",
    "        return geo\n",
    "    chart = geo_add_custom_coordinate()\n",
    "    chart.render_notebook()\n",
    "    a=chart.render_notebook()\n",
    "    return a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "6f4ebf2e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '西安':'https://assets.pyecharts.org/assets/maps/shan3_xi1_xi1_an1'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"0a6372e7626c46d4bc0e59b575defd30\" style=\"width:1000px; height:600px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '西安'], function(echarts) {\n",
       "                var chart_0a6372e7626c46d4bc0e59b575defd30 = echarts.init(\n",
       "                    document.getElementById('0a6372e7626c46d4bc0e59b575defd30'), 'light', {renderer: 'canvas'});\n",
       "                var option_0a6372e7626c46d4bc0e59b575defd30 = {\n",
       "    \"backgroundColor\": \"#EEEEE8\",\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u534e\\u5c71Mount Hua\",\n",
       "                    \"value\": [\n",
       "                        \"110.073018\",\n",
       "                        \"34.497645\",\n",
       "                        \"10334\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6d3b\\u6b7b\\u4eba\\u5893Tomb of the Living Dead\",\n",
       "                    \"value\": [\n",
       "                        \"108.504052\",\n",
       "                        \"34.126918\",\n",
       "                        \"20\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u79e6\\u5cad\\u56fd\\u5bb6\\u690d\\u7269\\u56edQinling National Botanical Garden\",\n",
       "                    \"value\": [\n",
       "                        \"108.3677360986\",\n",
       "                        \"34.0733875136\",\n",
       "                        \"11\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u56de\\u6c11\\u8857Muslim Quarter\",\n",
       "                    \"value\": [\n",
       "                        \"108.950131\",\n",
       "                        \"34.26682\",\n",
       "                        \"12745\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u79e6\\u59cb\\u7687\\u5e1d\\u9675\\u535a\\u7269\\u9662(\\u5175\\u9a6c\\u4fd1)Emperor Qinshihuang's Mausoleum Site Museum\",\n",
       "                    \"value\": [\n",
       "                        \"109.2851\",\n",
       "                        \"34.389417\",\n",
       "                        \"19596\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u5510\\u8299\\u84c9\\u56edTang Dynasty Furong Garden\",\n",
       "                    \"value\": [\n",
       "                        \"108.981465\",\n",
       "                        \"34.219076\",\n",
       "                        \"5392\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u572d\\u5cf0\\u5c71Guifeng Mountain\",\n",
       "                    \"value\": [\n",
       "                        \"108.692697\",\n",
       "                        \"33.98677\",\n",
       "                        \"4\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\\u5386\\u53f2\\u535a\\u7269\\u9986Shaanxi History Museum\",\n",
       "                    \"value\": [\n",
       "                        \"108.961523\",\n",
       "                        \"34.230567\",\n",
       "                        \"9698\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u697c\\u89c2\\u53f0\\u56fd\\u5bb6\\u68ee\\u6797\\u516c\\u56edLouguantai National Forest Park\",\n",
       "                    \"value\": [\n",
       "                        \"108.3365914964\",\n",
       "                        \"34.0585449447\",\n",
       "                        \"109\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u767d\\u9e7f\\u539f\\u5f71\\u89c6\\u57ceBailuyuan Film City\",\n",
       "                    \"value\": [\n",
       "                        \"109.282525\",\n",
       "                        \"34.078546\",\n",
       "                        \"240\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u96c1\\u5854Giant Wild Goose Pagoda\",\n",
       "                    \"value\": [\n",
       "                        \"108.970602\",\n",
       "                        \"34.224579\",\n",
       "                        \"4225\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8d75\\u516c\\u660e\\u6587\\u5316\\u666f\\u533aZhaogongming Culture Sceneic Area\",\n",
       "                    \"value\": [\n",
       "                        \"108.349119\",\n",
       "                        \"34.080217\",\n",
       "                        \"101\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u592a\\u5e73\\u56fd\\u5bb6\\u68ee\\u6797\\u516c\\u56edTaiping National Forest Park\",\n",
       "                    \"value\": [\n",
       "                        \"108.651342\",\n",
       "                        \"33.913412\",\n",
       "                        \"279\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u534e\\u6e05\\u5babHuaqing Pool\",\n",
       "                    \"value\": [\n",
       "                        \"109.222908\",\n",
       "                        \"34.363989\",\n",
       "                        \"8995\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u96c1\\u5854\\u5317\\u5e7f\\u573a\\u97f3\\u4e50\\u55b7\\u6cc9Big Wild Goose Pagoda North Square Music Fountain\",\n",
       "                    \"value\": [\n",
       "                        \"108.970574\",\n",
       "                        \"34.227547\",\n",
       "                        \"904\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8349\\u5802\\u5bfaCaotang Temple\",\n",
       "                    \"value\": [\n",
       "                        \"108.7505289486\",\n",
       "                        \"34.019776875\",\n",
       "                        \"48\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u5b89\\u57ce\\u5899Fortifications of Xi'an\",\n",
       "                    \"value\": [\n",
       "                        \"108.954666\",\n",
       "                        \"34.257907\",\n",
       "                        \"7726\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7389\\u5c71\\u84dd\\u6cb3\\u98ce\\u666f\\u533aYushanlanhe Sceneic Area\",\n",
       "                    \"value\": [\n",
       "                        \"109.456433\",\n",
       "                        \"34.079634\",\n",
       "                        \"2\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8299\\u84c9\\u56edFurong Garden\",\n",
       "                    \"value\": [\n",
       "                        \"109.217941\",\n",
       "                        \"34.370615\",\n",
       "                        \"47\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u660e\\u5bab\\u56fd\\u5bb6\\u9057\\u5740\\u516c\\u56edDaming Palace National Heritage Park\",\n",
       "                    \"value\": [\n",
       "                        \"108.969567\",\n",
       "                        \"34.298594\",\n",
       "                        \"1799\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5fb7\\u798f\\u5df7Defu Lane\",\n",
       "                    \"value\": [\n",
       "                        \"108.95035\",\n",
       "                        \"34.260436\",\n",
       "                        \"160\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5468\\u81f3\\u8001\\u53bf\\u57ceZhouzhi Old Country\",\n",
       "                    \"value\": [\n",
       "                        \"108.208751\",\n",
       "                        \"34.168254\",\n",
       "                        \"18\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9ad8\\u5bb6\\u5927\\u9662Gaojia Courtyard\",\n",
       "                    \"value\": [\n",
       "                        \"108.949711\",\n",
       "                        \"34.268983\",\n",
       "                        \"754\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u897f\\u5b89\\u65c5\\u6e38\\u666f\\u70b9\\u6d9f\\u6f2a\\u6563\\u70b9\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"\\u897f\\u5b89\",\n",
       "        \"roam\": true,\n",
       "        \"aspectScale\": 0.75,\n",
       "        \"nameProperty\": \"name\",\n",
       "        \"selectedMode\": false,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_0a6372e7626c46d4bc0e59b575defd30.setOption(option_0a6372e7626c46d4bc0e59b575defd30);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x14952ec8>"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xiansandian()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "4526f5bd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>26.923792</td>\n",
       "      <td>100.219527</td>\n",
       "      <td>雪山艺术小镇Snow Mountain Art Town</td>\n",
       "      <td>3</td>\n",
       "      <td>43</td>\n",
       "      <td>丽江景点排名第1</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>27.689714</td>\n",
       "      <td>100.793373</td>\n",
       "      <td>泸沽湖Lugu Lake</td>\n",
       "      <td>308</td>\n",
       "      <td>10144</td>\n",
       "      <td>宁蒗景点排名第1</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>27.661688</td>\n",
       "      <td>100.815016</td>\n",
       "      <td>泸沽湖观景台Lugu Lake Viewing Platform</td>\n",
       "      <td>32</td>\n",
       "      <td>591</td>\n",
       "      <td>宁蒗景点排名第9</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105</th>\n",
       "      <td>27.3027300615</td>\n",
       "      <td>99.6576320953</td>\n",
       "      <td>巨甸古镇Judian Ancient Town</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>丽江景点排名第128</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>27.065193</td>\n",
       "      <td>100.583019</td>\n",
       "      <td>丽宁十八弯观景台Observation Deck, Lining Eighteen Bend</td>\n",
       "      <td>43</td>\n",
       "      <td>79</td>\n",
       "      <td>丽江景点排名第51</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>27.744687</td>\n",
       "      <td>100.778834</td>\n",
       "      <td>大悲海螺经堂</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>泸沽湖景点排名第43</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>138</th>\n",
       "      <td>26.885839</td>\n",
       "      <td>100.240411</td>\n",
       "      <td>红谷坡地艺术区</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>137</th>\n",
       "      <td>26.9222753086</td>\n",
       "      <td>100.212234319</td>\n",
       "      <td>束河风味美食街</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>136</th>\n",
       "      <td>26.783244</td>\n",
       "      <td>100.263068</td>\n",
       "      <td>东西关小长城</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>26.871386</td>\n",
       "      <td>100.242984</td>\n",
       "      <td>丽江梵高星空艺术馆Lijiang Fangao Xingkong Art Museum</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               lat            lng  \\\n",
       "59       26.923792     100.219527   \n",
       "0        27.689714     100.793373   \n",
       "20       27.661688     100.815016   \n",
       "105  27.3027300615  99.6576320953   \n",
       "61       27.065193     100.583019   \n",
       "..             ...            ...   \n",
       "80       27.744687     100.778834   \n",
       "138      26.885839     100.240411   \n",
       "137  26.9222753086  100.212234319   \n",
       "136      26.783244     100.263068   \n",
       "199      26.871386     100.242984   \n",
       "\n",
       "                                               景点名称 攻略提到数量   点评数量        景点排名  \\\n",
       "59                     雪山艺术小镇Snow Mountain Art Town      3     43    丽江景点排名第1   \n",
       "0                                      泸沽湖Lugu Lake    308  10144    宁蒗景点排名第1   \n",
       "20                 泸沽湖观景台Lugu Lake Viewing Platform     32    591    宁蒗景点排名第9   \n",
       "105                         巨甸古镇Judian Ancient Town      1     10  丽江景点排名第128   \n",
       "61   丽宁十八弯观景台Observation Deck, Lining Eighteen Bend     43     79   丽江景点排名第51   \n",
       "..                                              ...    ...    ...         ...   \n",
       "80                                           大悲海螺经堂      1      4  泸沽湖景点排名第43   \n",
       "138                                         红谷坡地艺术区      0      0               \n",
       "137                                         束河风味美食街      0      0               \n",
       "136                                          东西关小长城      0      0               \n",
       "199     丽江梵高星空艺术馆Lijiang Fangao Xingkong Art Museum      0      0               \n",
       "\n",
       "      星级  \n",
       "59   98%  \n",
       "0    96%  \n",
       "20   96%  \n",
       "105  96%  \n",
       "61   96%  \n",
       "..   ...  \n",
       "80    0%  \n",
       "138   0%  \n",
       "137   0%  \n",
       "136   0%  \n",
       "199   0%  \n",
       "\n",
       "[200 rows x 7 columns]"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "urllst = []\n",
    "ui = 'https://travel.qunar.com/p-cs300079-lijiang-jingdian-1-'\n",
    "for i in range(1,21):\n",
    "    urllst.append(ui +str(i))\n",
    "\n",
    "    \n",
    "#访问页面加解析\n",
    "# 初步访问页面\n",
    "u1 = urllst[1]\n",
    "r = requests.get(u1)\n",
    "soup = BeautifulSoup(r.text, 'lxml')\n",
    "ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "li = ul.find_all('li')\n",
    "li1 = li[0]\n",
    "# 筛选第一个数据\n",
    "dic = {}\n",
    "dic['lat'] = li1['data-lat']\n",
    "dic['lng'] = li1['data-lng']\n",
    "dic['景点名称'] = li1.find('span',class_=\"cn_tit\").text\n",
    "dic['攻略提到数量'] = li1.find('div',class_=\"strategy_sum\").text\n",
    "dic['点评数量'] = li1.find('div',class_=\"comment_sum\").text\n",
    "dic['景点排名'] = li1.find('span',class_=\"ranking_sum\").text\n",
    "dic['星级'] = li1.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "# 标签识别\n",
    "\n",
    "datai = []\n",
    "n=0\n",
    "for i in li:\n",
    "    n+=1\n",
    "    dic = {}\n",
    "    dic['lat'] = i['data-lat']\n",
    "    dic['lng'] = i['data-lng']\n",
    "    dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "    dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "    dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "    dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "    dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "    datai.append(dic)\n",
    "# 分别获取字段内容\n",
    "        \n",
    "datai[:2]\n",
    "datai = []\n",
    "n=0\n",
    "for ui in urllst:\n",
    "    r = requests.get(ui)\n",
    "    soup = BeautifulSoup(r.text, 'lxml')\n",
    "        # 访问数据\n",
    "    ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "    li = ul.find_all('li')\n",
    "        # 解析标签\n",
    "    for i in li:\n",
    "        n+=1\n",
    "        dic = {}\n",
    "        dic['lat'] = i['data-lat']\n",
    "        dic['lng'] = i['data-lng']\n",
    "        dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "        dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "        dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "        dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "        dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "        datai.append(dic)\n",
    "        #print('成功采集%i条数据' % n)\n",
    "        # 分别获取字段内容\n",
    "datai[:5]\n",
    "\n",
    "df = pd.DataFrame(datai)\n",
    "df.sort_values('星级',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "845b106e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "      <th>rn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>27.689714</td>\n",
       "      <td>100.793373</td>\n",
       "      <td>泸沽湖Lugu Lake</td>\n",
       "      <td>308</td>\n",
       "      <td>10144</td>\n",
       "      <td>宁蒗景点排名第1</td>\n",
       "      <td>96%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>27.140138</td>\n",
       "      <td>100.210479</td>\n",
       "      <td>玉龙雪山Jade Dragon Snow Mountain</td>\n",
       "      <td>957</td>\n",
       "      <td>9919</td>\n",
       "      <td>丽江景点排名第1</td>\n",
       "      <td>94%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>26.926337</td>\n",
       "      <td>100.212875</td>\n",
       "      <td>束河古镇Shuhe Ancient Town</td>\n",
       "      <td>426</td>\n",
       "      <td>5294</td>\n",
       "      <td>丽江景点排名第1</td>\n",
       "      <td>92%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>27.659268</td>\n",
       "      <td>100.814674</td>\n",
       "      <td>摩梭族篝火晚会</td>\n",
       "      <td>8</td>\n",
       "      <td>48</td>\n",
       "      <td>泸沽湖景点排名第1</td>\n",
       "      <td>78%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>26.923792</td>\n",
       "      <td>100.219527</td>\n",
       "      <td>雪山艺术小镇Snow Mountain Art Town</td>\n",
       "      <td>3</td>\n",
       "      <td>43</td>\n",
       "      <td>丽江景点排名第1</td>\n",
       "      <td>98%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>26.795207</td>\n",
       "      <td>100.434532</td>\n",
       "      <td>梓里古镇Zili Ancient Town</td>\n",
       "      <td>7</td>\n",
       "      <td>20</td>\n",
       "      <td>永胜景点排名第1</td>\n",
       "      <td>90%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>26.876527</td>\n",
       "      <td>100.24195</td>\n",
       "      <td>丽江古城Lijiang Ancient City</td>\n",
       "      <td>1550</td>\n",
       "      <td>18156</td>\n",
       "      <td>丽江景点排名第2</td>\n",
       "      <td>90%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>27.686007</td>\n",
       "      <td>100.774578</td>\n",
       "      <td>摩梭民俗博物馆Mosuo Minsu Museum</td>\n",
       "      <td>2</td>\n",
       "      <td>84</td>\n",
       "      <td>宁蒗景点排名第2</td>\n",
       "      <td>56%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>26.926334</td>\n",
       "      <td>100.212882</td>\n",
       "      <td>束河四方街Sifang Street</td>\n",
       "      <td>7</td>\n",
       "      <td>281</td>\n",
       "      <td>丽江景点排名第2</td>\n",
       "      <td>90%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>27.006238</td>\n",
       "      <td>100.207218</td>\n",
       "      <td>丽江花海</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>玉龙景点排名第2</td>\n",
       "      <td>80%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>26.9231550161</td>\n",
       "      <td>100.2113830055</td>\n",
       "      <td>四方听音广场Sifang Tingyin</td>\n",
       "      <td>2</td>\n",
       "      <td>71</td>\n",
       "      <td>丽江景点排名第3</td>\n",
       "      <td>86%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>26.879177</td>\n",
       "      <td>100.144134</td>\n",
       "      <td>拉市海Lashi Lake</td>\n",
       "      <td>687</td>\n",
       "      <td>4162</td>\n",
       "      <td>丽江景点排名第3</td>\n",
       "      <td>82%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>27.0342596485</td>\n",
       "      <td>100.2685887378</td>\n",
       "      <td>三江并流</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>玉龙景点排名第3</td>\n",
       "      <td>80%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>26.928095</td>\n",
       "      <td>100.210467</td>\n",
       "      <td>青龙桥Qinglong Bridge</td>\n",
       "      <td>15</td>\n",
       "      <td>76</td>\n",
       "      <td>丽江景点排名第4</td>\n",
       "      <td>82%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>26.9077</td>\n",
       "      <td>100.049536</td>\n",
       "      <td>茶马古道Tea Horse Road</td>\n",
       "      <td>298</td>\n",
       "      <td>170</td>\n",
       "      <td>丽江景点排名第4</td>\n",
       "      <td>78%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>26.7059514986</td>\n",
       "      <td>100.2374258998</td>\n",
       "      <td>九色玫瑰小镇Nine Color Rose Town</td>\n",
       "      <td>2</td>\n",
       "      <td>58</td>\n",
       "      <td>丽江景点排名第5</td>\n",
       "      <td>84%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>26.928268</td>\n",
       "      <td>100.211785</td>\n",
       "      <td>茶马古道博物馆Ancient Tea Horse Road Museum</td>\n",
       "      <td>13</td>\n",
       "      <td>194</td>\n",
       "      <td>丽江景点排名第5</td>\n",
       "      <td>86%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>27.685369</td>\n",
       "      <td>100.775828</td>\n",
       "      <td>大落水村Daluoshui Village</td>\n",
       "      <td>78</td>\n",
       "      <td>556</td>\n",
       "      <td>宁蒗景点排名第5</td>\n",
       "      <td>92%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>26.875176</td>\n",
       "      <td>100.241011</td>\n",
       "      <td>木府Mufu Palace</td>\n",
       "      <td>342</td>\n",
       "      <td>3407</td>\n",
       "      <td>丽江景点排名第6</td>\n",
       "      <td>88%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>27.749554</td>\n",
       "      <td>100.777023</td>\n",
       "      <td>小落水村Xiaoluoshui Village</td>\n",
       "      <td>24</td>\n",
       "      <td>320</td>\n",
       "      <td>宁蒗景点排名第6</td>\n",
       "      <td>88%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>27.237553651</td>\n",
       "      <td>100.1526835484</td>\n",
       "      <td>虎跳峡（丽江段）Tiger Leaping Gorge</td>\n",
       "      <td>152</td>\n",
       "      <td>1634</td>\n",
       "      <td>丽江景点排名第7</td>\n",
       "      <td>94%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>26.930471</td>\n",
       "      <td>100.210386</td>\n",
       "      <td>九鼎龙潭Nine-Tripod Dragon Pond</td>\n",
       "      <td>12</td>\n",
       "      <td>175</td>\n",
       "      <td>丽江景点排名第7</td>\n",
       "      <td>92%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>27.733493</td>\n",
       "      <td>100.758288</td>\n",
       "      <td>里格岛Lige Island</td>\n",
       "      <td>19</td>\n",
       "      <td>559</td>\n",
       "      <td>宁蒗景点排名第8</td>\n",
       "      <td>96%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>26.872626</td>\n",
       "      <td>100.166953</td>\n",
       "      <td>茶马古道安中马场Ancient Tea Route Anzhong Racecourse</td>\n",
       "      <td>1</td>\n",
       "      <td>125</td>\n",
       "      <td>丽江景点排名第8</td>\n",
       "      <td>100%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>26.897802</td>\n",
       "      <td>100.24388</td>\n",
       "      <td>黑龙潭公园Black Dragon Pool Park</td>\n",
       "      <td>151</td>\n",
       "      <td>1065</td>\n",
       "      <td>丽江景点排名第8</td>\n",
       "      <td>86%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>27.661688</td>\n",
       "      <td>100.815016</td>\n",
       "      <td>泸沽湖观景台Lugu Lake Viewing Platform</td>\n",
       "      <td>32</td>\n",
       "      <td>591</td>\n",
       "      <td>宁蒗景点排名第9</td>\n",
       "      <td>96%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>26.942118</td>\n",
       "      <td>100.236554</td>\n",
       "      <td>雪山玫瑰庄园Snow Mountain and Rose Manor</td>\n",
       "      <td>0</td>\n",
       "      <td>21</td>\n",
       "      <td>玉龙景点排名第9</td>\n",
       "      <td>100%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>26.873009</td>\n",
       "      <td>100.236431</td>\n",
       "      <td>白马龙潭寺Longtan Temple</td>\n",
       "      <td>20</td>\n",
       "      <td>277</td>\n",
       "      <td>丽江景点排名第9</td>\n",
       "      <td>88%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              lat             lng  \\\n",
       "0       27.689714      100.793373   \n",
       "1       27.140138      100.210479   \n",
       "2       26.926337      100.212875   \n",
       "3       27.659268      100.814674   \n",
       "4       26.923792      100.219527   \n",
       "5       26.795207      100.434532   \n",
       "6       26.876527       100.24195   \n",
       "7       27.686007      100.774578   \n",
       "8       26.926334      100.212882   \n",
       "9       27.006238      100.207218   \n",
       "10  26.9231550161  100.2113830055   \n",
       "11      26.879177      100.144134   \n",
       "12  27.0342596485  100.2685887378   \n",
       "13      26.928095      100.210467   \n",
       "14        26.9077      100.049536   \n",
       "15  26.7059514986  100.2374258998   \n",
       "16      26.928268      100.211785   \n",
       "17      27.685369      100.775828   \n",
       "18      26.875176      100.241011   \n",
       "19      27.749554      100.777023   \n",
       "20   27.237553651  100.1526835484   \n",
       "21      26.930471      100.210386   \n",
       "22      27.733493      100.758288   \n",
       "23      26.872626      100.166953   \n",
       "24      26.897802       100.24388   \n",
       "25      27.661688      100.815016   \n",
       "26      26.942118      100.236554   \n",
       "27      26.873009      100.236431   \n",
       "\n",
       "                                            景点名称 攻略提到数量   点评数量       景点排名  \\\n",
       "0                                   泸沽湖Lugu Lake    308  10144   宁蒗景点排名第1   \n",
       "1                  玉龙雪山Jade Dragon Snow Mountain    957   9919   丽江景点排名第1   \n",
       "2                         束河古镇Shuhe Ancient Town    426   5294   丽江景点排名第1   \n",
       "3                                        摩梭族篝火晚会      8     48  泸沽湖景点排名第1   \n",
       "4                   雪山艺术小镇Snow Mountain Art Town      3     43   丽江景点排名第1   \n",
       "5                          梓里古镇Zili Ancient Town      7     20   永胜景点排名第1   \n",
       "6                       丽江古城Lijiang Ancient City   1550  18156   丽江景点排名第2   \n",
       "7                      摩梭民俗博物馆Mosuo Minsu Museum      2     84   宁蒗景点排名第2   \n",
       "8                             束河四方街Sifang Street      7    281   丽江景点排名第2   \n",
       "9                                           丽江花海      1      3   玉龙景点排名第2   \n",
       "10                          四方听音广场Sifang Tingyin      2     71   丽江景点排名第3   \n",
       "11                                 拉市海Lashi Lake    687   4162   丽江景点排名第3   \n",
       "12                                          三江并流      1      9   玉龙景点排名第3   \n",
       "13                            青龙桥Qinglong Bridge     15     76   丽江景点排名第4   \n",
       "14                            茶马古道Tea Horse Road    298    170   丽江景点排名第4   \n",
       "15                    九色玫瑰小镇Nine Color Rose Town      2     58   丽江景点排名第5   \n",
       "16          茶马古道博物馆Ancient Tea Horse Road Museum     13    194   丽江景点排名第5   \n",
       "17                         大落水村Daluoshui Village     78    556   宁蒗景点排名第5   \n",
       "18                                 木府Mufu Palace    342   3407   丽江景点排名第6   \n",
       "19                       小落水村Xiaoluoshui Village     24    320   宁蒗景点排名第6   \n",
       "20                   虎跳峡（丽江段）Tiger Leaping Gorge    152   1634   丽江景点排名第7   \n",
       "21                   九鼎龙潭Nine-Tripod Dragon Pond     12    175   丽江景点排名第7   \n",
       "22                                里格岛Lige Island     19    559   宁蒗景点排名第8   \n",
       "23  茶马古道安中马场Ancient Tea Route Anzhong Racecourse      1    125   丽江景点排名第8   \n",
       "24                   黑龙潭公园Black Dragon Pool Park    151   1065   丽江景点排名第8   \n",
       "25              泸沽湖观景台Lugu Lake Viewing Platform     32    591   宁蒗景点排名第9   \n",
       "26            雪山玫瑰庄园Snow Mountain and Rose Manor      0     21   玉龙景点排名第9   \n",
       "27                           白马龙潭寺Longtan Temple     20    277   丽江景点排名第9   \n",
       "\n",
       "      星级  rn  \n",
       "0    96%   1  \n",
       "1    94%   1  \n",
       "2    92%   1  \n",
       "3    78%   1  \n",
       "4    98%   1  \n",
       "5    90%   1  \n",
       "6    90%   2  \n",
       "7    56%   2  \n",
       "8    90%   2  \n",
       "9    80%   2  \n",
       "10   86%   3  \n",
       "11   82%   3  \n",
       "12   80%   3  \n",
       "13   82%   4  \n",
       "14   78%   4  \n",
       "15   84%   5  \n",
       "16   86%   5  \n",
       "17   92%   5  \n",
       "18   88%   6  \n",
       "19   88%   6  \n",
       "20   94%   7  \n",
       "21   92%   7  \n",
       "22   96%   8  \n",
       "23  100%   8  \n",
       "24   86%   8  \n",
       "25   96%   9  \n",
       "26  100%   9  \n",
       "27   88%   9  "
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['景点排名'].replace('',np.nan,inplace=True)\n",
    "df.dropna(subset=['景点排名'], inplace=True)\n",
    "df['rn']=df['景点排名'].apply(lambda x:int(re.sub(\"\\D\",\"\",x)))\n",
    "dat=df.sort_values('rn')\n",
    "db=dat[dat['rn']<10]\n",
    "db.reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "046d5f10",
   "metadata": {},
   "outputs": [],
   "source": [
    "fen=[db.iloc[i]['景点名称']for i in range(db.shape[0])]\n",
    "lng=[db.iloc[i]['lng'] for i in range(db.shape[0])]\n",
    "lat=[db.iloc[i]['lat'] for i in range(db.shape[0])]\n",
    "value=[db.iloc[i]['点评数量'] for i in range(db.shape[0])]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "e068952e",
   "metadata": {},
   "outputs": [],
   "source": [
    "def lijiangsandian():\n",
    "    def geo_add_custom_coordinate():\n",
    "        geo = Geo(init_opts=opts.InitOpts(theme='light',\n",
    "                                      width='1000px',\n",
    "                                      height='600px',\n",
    "                                      bg_color = '#EEEEE8'))\n",
    "        for i in range(len(db)):\n",
    "                geo.add_coordinate(fen[i], lng[i],lat[i])\n",
    "                geo.add_schema(maptype=\"丽江\")\n",
    "                # 为自定义的点添加属性\n",
    "                geo.add(\"\",[(fen[i], value[i])],type_='effectScatter')#type_='heatmap' 热力图 #type_='effectScatter' 涟漪散点图\n",
    "                geo.set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "                geo.set_global_opts(title_opts=opts.TitleOpts(title=\"丽江旅游景点涟漪散点图\"),visualmap_opts=opts.VisualMapOpts())\n",
    "        return geo\n",
    "    chart = geo_add_custom_coordinate()\n",
    "    chart.render_notebook()\n",
    "    l=chart.render_notebook()\n",
    "    return l"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "4eafd1ff",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '丽江':'https://assets.pyecharts.org/assets/maps/yun2_nan2_li4_jiang1'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"7ae7b7aa049a41abbbba1fcf6730d117\" style=\"width:1000px; height:600px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '丽江'], function(echarts) {\n",
       "                var chart_7ae7b7aa049a41abbbba1fcf6730d117 = echarts.init(\n",
       "                    document.getElementById('7ae7b7aa049a41abbbba1fcf6730d117'), 'light', {renderer: 'canvas'});\n",
       "                var option_7ae7b7aa049a41abbbba1fcf6730d117 = {\n",
       "    \"backgroundColor\": \"#EEEEE8\",\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6cf8\\u6cbd\\u6e56Lugu Lake\",\n",
       "                    \"value\": [\n",
       "                        \"100.793373\",\n",
       "                        \"27.689714\",\n",
       "                        \"10144\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7389\\u9f99\\u96ea\\u5c71Jade Dragon Snow Mountain\",\n",
       "                    \"value\": [\n",
       "                        \"100.210479\",\n",
       "                        \"27.140138\",\n",
       "                        \"9919\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u675f\\u6cb3\\u53e4\\u9547Shuhe Ancient Town\",\n",
       "                    \"value\": [\n",
       "                        \"100.212875\",\n",
       "                        \"26.926337\",\n",
       "                        \"5294\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6469\\u68ad\\u65cf\\u7bdd\\u706b\\u665a\\u4f1a\",\n",
       "                    \"value\": [\n",
       "                        \"100.814674\",\n",
       "                        \"27.659268\",\n",
       "                        \"48\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u96ea\\u5c71\\u827a\\u672f\\u5c0f\\u9547Snow Mountain Art Town\",\n",
       "                    \"value\": [\n",
       "                        \"100.219527\",\n",
       "                        \"26.923792\",\n",
       "                        \"43\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6893\\u91cc\\u53e4\\u9547Zili Ancient Town\",\n",
       "                    \"value\": [\n",
       "                        \"100.434532\",\n",
       "                        \"26.795207\",\n",
       "                        \"20\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e3d\\u6c5f\\u53e4\\u57ceLijiang Ancient City\",\n",
       "                    \"value\": [\n",
       "                        \"100.24195\",\n",
       "                        \"26.876527\",\n",
       "                        \"18156\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6469\\u68ad\\u6c11\\u4fd7\\u535a\\u7269\\u9986Mosuo Minsu Museum\",\n",
       "                    \"value\": [\n",
       "                        \"100.774578\",\n",
       "                        \"27.686007\",\n",
       "                        \"84\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u675f\\u6cb3\\u56db\\u65b9\\u8857Sifang Street\",\n",
       "                    \"value\": [\n",
       "                        \"100.212882\",\n",
       "                        \"26.926334\",\n",
       "                        \"281\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e3d\\u6c5f\\u82b1\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        \"100.207218\",\n",
       "                        \"27.006238\",\n",
       "                        \"3\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u65b9\\u542c\\u97f3\\u5e7f\\u573aSifang Tingyin\",\n",
       "                    \"value\": [\n",
       "                        \"100.2113830055\",\n",
       "                        \"26.9231550161\",\n",
       "                        \"71\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u62c9\\u5e02\\u6d77Lashi Lake\",\n",
       "                    \"value\": [\n",
       "                        \"100.144134\",\n",
       "                        \"26.879177\",\n",
       "                        \"4162\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e09\\u6c5f\\u5e76\\u6d41\",\n",
       "                    \"value\": [\n",
       "                        \"100.2685887378\",\n",
       "                        \"27.0342596485\",\n",
       "                        \"9\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u9f99\\u6865Qinglong Bridge\",\n",
       "                    \"value\": [\n",
       "                        \"100.210467\",\n",
       "                        \"26.928095\",\n",
       "                        \"76\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8336\\u9a6c\\u53e4\\u9053Tea Horse Road\",\n",
       "                    \"value\": [\n",
       "                        \"100.049536\",\n",
       "                        \"26.9077\",\n",
       "                        \"170\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e5d\\u8272\\u73ab\\u7470\\u5c0f\\u9547Nine Color Rose Town\",\n",
       "                    \"value\": [\n",
       "                        \"100.2374258998\",\n",
       "                        \"26.7059514986\",\n",
       "                        \"58\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8336\\u9a6c\\u53e4\\u9053\\u535a\\u7269\\u9986Ancient Tea Horse Road Museum\",\n",
       "                    \"value\": [\n",
       "                        \"100.211785\",\n",
       "                        \"26.928268\",\n",
       "                        \"194\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5927\\u843d\\u6c34\\u6751Daluoshui Village\",\n",
       "                    \"value\": [\n",
       "                        \"100.775828\",\n",
       "                        \"27.685369\",\n",
       "                        \"556\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6728\\u5e9cMufu Palace\",\n",
       "                    \"value\": [\n",
       "                        \"100.241011\",\n",
       "                        \"26.875176\",\n",
       "                        \"3407\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5c0f\\u843d\\u6c34\\u6751Xiaoluoshui Village\",\n",
       "                    \"value\": [\n",
       "                        \"100.777023\",\n",
       "                        \"27.749554\",\n",
       "                        \"320\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u864e\\u8df3\\u5ce1\\uff08\\u4e3d\\u6c5f\\u6bb5\\uff09Tiger Leaping Gorge\",\n",
       "                    \"value\": [\n",
       "                        \"100.1526835484\",\n",
       "                        \"27.237553651\",\n",
       "                        \"1634\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e5d\\u9f0e\\u9f99\\u6f6dNine-Tripod Dragon Pond\",\n",
       "                    \"value\": [\n",
       "                        \"100.210386\",\n",
       "                        \"26.930471\",\n",
       "                        \"175\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u91cc\\u683c\\u5c9bLige Island\",\n",
       "                    \"value\": [\n",
       "                        \"100.758288\",\n",
       "                        \"27.733493\",\n",
       "                        \"559\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8336\\u9a6c\\u53e4\\u9053\\u5b89\\u4e2d\\u9a6c\\u573aAncient Tea Route Anzhong Racecourse\",\n",
       "                    \"value\": [\n",
       "                        \"100.166953\",\n",
       "                        \"26.872626\",\n",
       "                        \"125\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6f6d\\u516c\\u56edBlack Dragon Pool Park\",\n",
       "                    \"value\": [\n",
       "                        \"100.24388\",\n",
       "                        \"26.897802\",\n",
       "                        \"1065\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6cf8\\u6cbd\\u6e56\\u89c2\\u666f\\u53f0Lugu Lake Viewing Platform\",\n",
       "                    \"value\": [\n",
       "                        \"100.815016\",\n",
       "                        \"27.661688\",\n",
       "                        \"591\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u96ea\\u5c71\\u73ab\\u7470\\u5e84\\u56edSnow Mountain and Rose Manor\",\n",
       "                    \"value\": [\n",
       "                        \"100.236554\",\n",
       "                        \"26.942118\",\n",
       "                        \"21\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u767d\\u9a6c\\u9f99\\u6f6d\\u5bfaLongtan Temple\",\n",
       "                    \"value\": [\n",
       "                        \"100.236431\",\n",
       "                        \"26.873009\",\n",
       "                        \"277\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e3d\\u6c5f\\u65c5\\u6e38\\u666f\\u70b9\\u6d9f\\u6f2a\\u6563\\u70b9\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"\\u4e3d\\u6c5f\",\n",
       "        \"roam\": true,\n",
       "        \"aspectScale\": 0.75,\n",
       "        \"nameProperty\": \"name\",\n",
       "        \"selectedMode\": false,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_7ae7b7aa049a41abbbba1fcf6730d117.setOption(option_7ae7b7aa049a41abbbba1fcf6730d117);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11f4a148>"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lijiangsandian()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "7706a041",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>104</th>\n",
       "      <td>29.578407</td>\n",
       "      <td>106.584431</td>\n",
       "      <td>重庆科技馆Chongqing Science and Technology Museum</td>\n",
       "      <td>6</td>\n",
       "      <td>168</td>\n",
       "      <td>重庆景点排名第35</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>30.663286</td>\n",
       "      <td>108.263256</td>\n",
       "      <td>万州大瀑布Wanzhou Greatfalls</td>\n",
       "      <td>3</td>\n",
       "      <td>1893</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>98%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>158</th>\n",
       "      <td>29.399657</td>\n",
       "      <td>106.550483</td>\n",
       "      <td>汉海海洋公园Hanhai Ocean Park</td>\n",
       "      <td>5</td>\n",
       "      <td>199</td>\n",
       "      <td>重庆景点排名第34</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>156</th>\n",
       "      <td>29.561731</td>\n",
       "      <td>106.628824</td>\n",
       "      <td>南山风景区Nanshan Scenic Area</td>\n",
       "      <td>74</td>\n",
       "      <td>146</td>\n",
       "      <td>重庆景点排名第50</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>.0</td>\n",
       "      <td>.0</td>\n",
       "      <td>长江三峡</td>\n",
       "      <td>13</td>\n",
       "      <td>48</td>\n",
       "      <td>重庆景点排名第14</td>\n",
       "      <td>96%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119</th>\n",
       "      <td>29.305266</td>\n",
       "      <td>108.778842</td>\n",
       "      <td>濯水风雨廊桥Zhuoshui Lounge Bridge</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>116</th>\n",
       "      <td>29.326048</td>\n",
       "      <td>106.981023</td>\n",
       "      <td>黎香湖湿地生态园The Lixiang Lake Wetland Ecological Park</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105</th>\n",
       "      <td>31.0603</td>\n",
       "      <td>109.601956</td>\n",
       "      <td>白帝镇Baidizhen</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>103</th>\n",
       "      <td>28.962709</td>\n",
       "      <td>106.057354</td>\n",
       "      <td>塘河古镇Tanghe Ancient Town</td>\n",
       "      <td>1</td>\n",
       "      <td>24</td>\n",
       "      <td>重庆景点排名第605</td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>29.533817</td>\n",
       "      <td>106.505412</td>\n",
       "      <td>水王国温泉水世界</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>0%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           lat         lng                                              景点名称  \\\n",
       "104  29.578407  106.584431      重庆科技馆Chongqing Science and Technology Museum   \n",
       "27   30.663286  108.263256                           万州大瀑布Wanzhou Greatfalls   \n",
       "158  29.399657  106.550483                           汉海海洋公园Hanhai Ocean Park   \n",
       "156  29.561731  106.628824                          南山风景区Nanshan Scenic Area   \n",
       "26          .0          .0                                              长江三峡   \n",
       "..         ...         ...                                               ...   \n",
       "119  29.305266  108.778842                      濯水风雨廊桥Zhuoshui Lounge Bridge   \n",
       "116  29.326048  106.981023  黎香湖湿地生态园The Lixiang Lake Wetland Ecological Park   \n",
       "105    31.0603  109.601956                                      白帝镇Baidizhen   \n",
       "103  28.962709  106.057354                           塘河古镇Tanghe Ancient Town   \n",
       "199  29.533817  106.505412                                          水王国温泉水世界   \n",
       "\n",
       "    攻略提到数量  点评数量        景点排名   星级  \n",
       "104      6   168   重庆景点排名第35  98%  \n",
       "27       3  1893    重庆景点排名第1  98%  \n",
       "158      5   199   重庆景点排名第34  96%  \n",
       "156     74   146   重庆景点排名第50  96%  \n",
       "26      13    48   重庆景点排名第14  96%  \n",
       "..     ...   ...         ...  ...  \n",
       "119      0     3               0%  \n",
       "116      1    14    重庆景点排名第1   0%  \n",
       "105      0     8               0%  \n",
       "103      1    24  重庆景点排名第605   0%  \n",
       "199      0     0               0%  \n",
       "\n",
       "[200 rows x 7 columns]"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "urllst = []\n",
    "ui = 'https://travel.qunar.com/p-cs299979-chongqing-jingdian-1-'\n",
    "for i in range(1,21):\n",
    "    urllst.append(ui +str(i))\n",
    "\n",
    "    \n",
    "#访问页面加解析\n",
    "# 初步访问页面\n",
    "u1 = urllst[1]\n",
    "r = requests.get(u1)\n",
    "soup = BeautifulSoup(r.text, 'lxml')\n",
    "ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "li = ul.find_all('li')\n",
    "li1 = li[0]\n",
    "# 筛选第一个数据\n",
    "dic = {}\n",
    "dic['lat'] = li1['data-lat']\n",
    "dic['lng'] = li1['data-lng']\n",
    "dic['景点名称'] = li1.find('span',class_=\"cn_tit\").text\n",
    "dic['攻略提到数量'] = li1.find('div',class_=\"strategy_sum\").text\n",
    "dic['点评数量'] = li1.find('div',class_=\"comment_sum\").text\n",
    "dic['景点排名'] = li1.find('span',class_=\"ranking_sum\").text\n",
    "dic['星级'] = li1.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "# 标签识别\n",
    "\n",
    "datai = []\n",
    "n=0\n",
    "for i in li:\n",
    "    n+=1\n",
    "    dic = {}\n",
    "    dic['lat'] = i['data-lat']\n",
    "    dic['lng'] = i['data-lng']\n",
    "    dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "    dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "    dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "    dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "    dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "    datai.append(dic)\n",
    "# 分别获取字段内容\n",
    "        \n",
    "datai[:2]\n",
    "datai = []\n",
    "n=0\n",
    "for ui in urllst:\n",
    "    r = requests.get(ui)\n",
    "    soup = BeautifulSoup(r.text, 'lxml')\n",
    "        # 访问数据\n",
    "    ul = soup.find('ul',class_=\"list_item clrfix\")\n",
    "    li = ul.find_all('li')\n",
    "        # 解析标签\n",
    "    for i in li:\n",
    "        n+=1\n",
    "        dic = {}\n",
    "        dic['lat'] = i['data-lat']\n",
    "        dic['lng'] = i['data-lng']\n",
    "        dic['景点名称'] = i.find('span',class_=\"cn_tit\").text\n",
    "        dic['攻略提到数量'] = i.find('div',class_=\"strategy_sum\").text\n",
    "        dic['点评数量'] = i.find('div',class_=\"comment_sum\").text\n",
    "        dic['景点排名'] = i.find('span',class_=\"ranking_sum\").text\n",
    "        dic['星级'] = i.find('span',class_=\"total_star\").find('span')['style'].split(':')[1]\n",
    "        datai.append(dic)\n",
    "        #print('成功采集%i条数据' % n)\n",
    "        # 分别获取字段内容\n",
    "datai[:5]\n",
    "\n",
    "df = pd.DataFrame(datai)\n",
    "df.sort_values('星级',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "d935047a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>景点名称</th>\n",
       "      <th>攻略提到数量</th>\n",
       "      <th>点评数量</th>\n",
       "      <th>景点排名</th>\n",
       "      <th>星级</th>\n",
       "      <th>rn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>29.568126</td>\n",
       "      <td>106.584807</td>\n",
       "      <td>洪崖洞民俗风貌区Hongyadong Commercial Street</td>\n",
       "      <td>615</td>\n",
       "      <td>7180</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>92%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>29.5441710042</td>\n",
       "      <td>107.6000922001</td>\n",
       "      <td>武陵山国家森林公园Wuling Mountain National Forest Park</td>\n",
       "      <td>1</td>\n",
       "      <td>58</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>100%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>30.17977</td>\n",
       "      <td>106.500954</td>\n",
       "      <td>涞滩古镇Laitan Ancient Town</td>\n",
       "      <td>3</td>\n",
       "      <td>90</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>88%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>30.243973</td>\n",
       "      <td>108.397462</td>\n",
       "      <td>（重庆黄水旅游度假区）毕兹卡绿宫Bizika Lvgong</td>\n",
       "      <td>2</td>\n",
       "      <td>19</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>00%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>30.683128</td>\n",
       "      <td>109.017312</td>\n",
       "      <td>云阳龙缸国家地质公园Yunyang Longgang National Geological...</td>\n",
       "      <td>1</td>\n",
       "      <td>657</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>90%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>28.8574016351</td>\n",
       "      <td>108.7566611006</td>\n",
       "      <td>酉阳桃花源Youyang Peach Blossom Spring</td>\n",
       "      <td>17</td>\n",
       "      <td>853</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>94%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>31.039182</td>\n",
       "      <td>110.021384</td>\n",
       "      <td>神女峰The Goddess (Shennv) Peak</td>\n",
       "      <td>6</td>\n",
       "      <td>106</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>90%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30.663286</td>\n",
       "      <td>108.263256</td>\n",
       "      <td>万州大瀑布Wanzhou Greatfalls</td>\n",
       "      <td>3</td>\n",
       "      <td>1893</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>98%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>31.047313</td>\n",
       "      <td>109.585086</td>\n",
       "      <td>瞿塘峡Qutang Gorge</td>\n",
       "      <td>9</td>\n",
       "      <td>195</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>92%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>29.326048</td>\n",
       "      <td>106.981023</td>\n",
       "      <td>黎香湖湿地生态园The Lixiang Lake Wetland Ecological Park</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>0%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>29.15722</td>\n",
       "      <td>108.12709</td>\n",
       "      <td>阿依河景区Ayi River</td>\n",
       "      <td>3</td>\n",
       "      <td>226</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>86%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>29.564388</td>\n",
       "      <td>106.583222</td>\n",
       "      <td>重庆好吃街Chongqing Haochi Street</td>\n",
       "      <td>82</td>\n",
       "      <td>519</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>90%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>29.9196049433</td>\n",
       "      <td>107.2479380391</td>\n",
       "      <td>长寿湖Changshou Lake</td>\n",
       "      <td>2</td>\n",
       "      <td>198</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>88%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>29.563863</td>\n",
       "      <td>106.589285</td>\n",
       "      <td>长江索道Yangtze River Cableway</td>\n",
       "      <td>326</td>\n",
       "      <td>3708</td>\n",
       "      <td>重庆景点排名第1</td>\n",
       "      <td>86%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>29.325422</td>\n",
       "      <td>107.759931</td>\n",
       "      <td>武隆</td>\n",
       "      <td>23</td>\n",
       "      <td>5076</td>\n",
       "      <td>武隆景点排名第1</td>\n",
       "      <td>90%</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>30.011052</td>\n",
       "      <td>106.322661</td>\n",
       "      <td>钓鱼城Diaoyu Castle</td>\n",
       "      <td>3</td>\n",
       "      <td>243</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>90%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>29.892005</td>\n",
       "      <td>107.732401</td>\n",
       "      <td>丰都鬼城名山景区Fengdu Ghost City</td>\n",
       "      <td>17</td>\n",
       "      <td>484</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>72%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>30.916655</td>\n",
       "      <td>108.711905</td>\n",
       "      <td>张飞庙Zhang Fei Temple</td>\n",
       "      <td>1</td>\n",
       "      <td>285</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>96%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>29.0552056865</td>\n",
       "      <td>107.1339128485</td>\n",
       "      <td>金佛山Jinfo Mountain</td>\n",
       "      <td>8</td>\n",
       "      <td>520</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>88%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>29.863712</td>\n",
       "      <td>107.072768</td>\n",
       "      <td>长寿古镇Changshou Ancient Town</td>\n",
       "      <td>2</td>\n",
       "      <td>214</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>86%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>28.925779</td>\n",
       "      <td>108.358152</td>\n",
       "      <td>龚滩景区Gongtan Ancient Town</td>\n",
       "      <td>22</td>\n",
       "      <td>420</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>92%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>31.086327</td>\n",
       "      <td>109.894762</td>\n",
       "      <td>巫山小三峡Wushan Little Three Gorges</td>\n",
       "      <td>8</td>\n",
       "      <td>468</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>88%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>31.047242</td>\n",
       "      <td>109.581821</td>\n",
       "      <td>白帝城景区Baidi City Scenic Area</td>\n",
       "      <td>14</td>\n",
       "      <td>620</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>92%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>29.503326</td>\n",
       "      <td>107.745381</td>\n",
       "      <td>仙女山国家森林公园Fairy Mountain National Forest Park</td>\n",
       "      <td>45</td>\n",
       "      <td>1367</td>\n",
       "      <td>重庆景点排名第2</td>\n",
       "      <td>94%</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>31.021011</td>\n",
       "      <td>109.927152</td>\n",
       "      <td>三峡云巅神女天路景区Sanxia Yundianshen Nv Tianlu Sceneic...</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>巫山景点排名第3</td>\n",
       "      <td>0%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>30.9586486816</td>\n",
       "      <td>108.905025632</td>\n",
       "      <td>龙脊石Longji Stone</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>重庆景点排名第3</td>\n",
       "      <td>100%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>29.587707</td>\n",
       "      <td>106.456424</td>\n",
       "      <td>磁器口古镇Ciqikou Ancient Town</td>\n",
       "      <td>489</td>\n",
       "      <td>11604</td>\n",
       "      <td>重庆景点排名第3</td>\n",
       "      <td>86%</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>29.563503</td>\n",
       "      <td>106.583623</td>\n",
       "      <td>解放碑步行街Jiefangbei</td>\n",
       "      <td>581</td>\n",
       "      <td>3831</td>\n",
       "      <td>重庆景点排名第4</td>\n",
       "      <td>88%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>29.558319</td>\n",
       "      <td>106.555938</td>\n",
       "      <td>皇冠大扶梯Crown Escalator</td>\n",
       "      <td>119</td>\n",
       "      <td>419</td>\n",
       "      <td>重庆景点排名第4</td>\n",
       "      <td>80%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>31.058933981</td>\n",
       "      <td>109.4678755735</td>\n",
       "      <td>天鹅湖风景区Swan Lake</td>\n",
       "      <td>1</td>\n",
       "      <td>27</td>\n",
       "      <td>重庆景点排名第4</td>\n",
       "      <td>100%</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>29.4351390166</td>\n",
       "      <td>107.809706313</td>\n",
       "      <td>武隆喀斯特旅游区Wulong Tiankeng Land Slot National Geo...</td>\n",
       "      <td>8</td>\n",
       "      <td>1011</td>\n",
       "      <td>重庆景点排名第5</td>\n",
       "      <td>94%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>29.994082</td>\n",
       "      <td>106.035503</td>\n",
       "      <td>安居古城Anju ancient city</td>\n",
       "      <td>1</td>\n",
       "      <td>163</td>\n",
       "      <td>重庆景点排名第5</td>\n",
       "      <td>80%</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>30.750759</td>\n",
       "      <td>109.482004</td>\n",
       "      <td>小寨天坑风景区Xiaozha Sky Hole Scenic Area</td>\n",
       "      <td>15</td>\n",
       "      <td>725</td>\n",
       "      <td>重庆景点排名第6</td>\n",
       "      <td>92%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>29.439361</td>\n",
       "      <td>107.811703</td>\n",
       "      <td>武隆天生三桥Wulong Tiansheng Three Bridges</td>\n",
       "      <td>45</td>\n",
       "      <td>5141</td>\n",
       "      <td>重庆景点排名第6</td>\n",
       "      <td>92%</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>29.556344</td>\n",
       "      <td>106.575293</td>\n",
       "      <td>山城步道Mountain Town Trail</td>\n",
       "      <td>60</td>\n",
       "      <td>436</td>\n",
       "      <td>重庆景点排名第7</td>\n",
       "      <td>90%</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>29.551615</td>\n",
       "      <td>106.609884</td>\n",
       "      <td>南山一棵树观景台Nanshan Tree Viewing Platform</td>\n",
       "      <td>128</td>\n",
       "      <td>816</td>\n",
       "      <td>重庆景点排名第8</td>\n",
       "      <td>88%</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>29.573221</td>\n",
       "      <td>106.594506</td>\n",
       "      <td>朝天门广场Chaotianmen Square</td>\n",
       "      <td>221</td>\n",
       "      <td>1332</td>\n",
       "      <td>重庆景点排名第9</td>\n",
       "      <td>84%</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              lat             lng  \\\n",
       "0       29.568126      106.584807   \n",
       "1   29.5441710042  107.6000922001   \n",
       "2        30.17977      106.500954   \n",
       "3       30.243973      108.397462   \n",
       "4       30.683128      109.017312   \n",
       "5   28.8574016351  108.7566611006   \n",
       "6       31.039182      110.021384   \n",
       "7       30.663286      108.263256   \n",
       "8       31.047313      109.585086   \n",
       "9       29.326048      106.981023   \n",
       "10       29.15722       108.12709   \n",
       "11      29.564388      106.583222   \n",
       "12  29.9196049433  107.2479380391   \n",
       "13      29.563863      106.589285   \n",
       "14      29.325422      107.759931   \n",
       "15      30.011052      106.322661   \n",
       "16      29.892005      107.732401   \n",
       "17      30.916655      108.711905   \n",
       "18  29.0552056865  107.1339128485   \n",
       "19      29.863712      107.072768   \n",
       "20      28.925779      108.358152   \n",
       "21      31.086327      109.894762   \n",
       "22      31.047242      109.581821   \n",
       "23      29.503326      107.745381   \n",
       "24      31.021011      109.927152   \n",
       "25  30.9586486816   108.905025632   \n",
       "26      29.587707      106.456424   \n",
       "27      29.563503      106.583623   \n",
       "28      29.558319      106.555938   \n",
       "29   31.058933981  109.4678755735   \n",
       "30  29.4351390166   107.809706313   \n",
       "31      29.994082      106.035503   \n",
       "32      30.750759      109.482004   \n",
       "33      29.439361      107.811703   \n",
       "34      29.556344      106.575293   \n",
       "35      29.551615      106.609884   \n",
       "36      29.573221      106.594506   \n",
       "\n",
       "                                                 景点名称 攻略提到数量   点评数量      景点排名  \\\n",
       "0                洪崖洞民俗风貌区Hongyadong Commercial Street    615   7180  重庆景点排名第1   \n",
       "1       武陵山国家森林公园Wuling Mountain National Forest Park      1     58  重庆景点排名第1   \n",
       "2                             涞滩古镇Laitan Ancient Town      3     90  重庆景点排名第1   \n",
       "3                       （重庆黄水旅游度假区）毕兹卡绿宫Bizika Lvgong      2     19  重庆景点排名第1   \n",
       "4   云阳龙缸国家地质公园Yunyang Longgang National Geological...      1    657  重庆景点排名第1   \n",
       "5                   酉阳桃花源Youyang Peach Blossom Spring     17    853  重庆景点排名第1   \n",
       "6                        神女峰The Goddess (Shennv) Peak      6    106  重庆景点排名第1   \n",
       "7                             万州大瀑布Wanzhou Greatfalls      3   1893  重庆景点排名第1   \n",
       "8                                     瞿塘峡Qutang Gorge      9    195  重庆景点排名第1   \n",
       "9    黎香湖湿地生态园The Lixiang Lake Wetland Ecological Park      1     14  重庆景点排名第1   \n",
       "10                                     阿依河景区Ayi River      3    226  重庆景点排名第1   \n",
       "11                       重庆好吃街Chongqing Haochi Street     82    519  重庆景点排名第1   \n",
       "12                                  长寿湖Changshou Lake      2    198  重庆景点排名第1   \n",
       "13                         长江索道Yangtze River Cableway    326   3708  重庆景点排名第1   \n",
       "14                                                 武隆     23   5076  武隆景点排名第1   \n",
       "15                                   钓鱼城Diaoyu Castle      3    243  重庆景点排名第2   \n",
       "16                          丰都鬼城名山景区Fengdu Ghost City     17    484  重庆景点排名第2   \n",
       "17                                张飞庙Zhang Fei Temple      1    285  重庆景点排名第2   \n",
       "18                                  金佛山Jinfo Mountain      8    520  重庆景点排名第2   \n",
       "19                         长寿古镇Changshou Ancient Town      2    214  重庆景点排名第2   \n",
       "20                           龚滩景区Gongtan Ancient Town     22    420  重庆景点排名第2   \n",
       "21                    巫山小三峡Wushan Little Three Gorges      8    468  重庆景点排名第2   \n",
       "22                        白帝城景区Baidi City Scenic Area     14    620  重庆景点排名第2   \n",
       "23       仙女山国家森林公园Fairy Mountain National Forest Park     45   1367  重庆景点排名第2   \n",
       "24  三峡云巅神女天路景区Sanxia Yundianshen Nv Tianlu Sceneic...      0      4  巫山景点排名第3   \n",
       "25                                    龙脊石Longji Stone      1      8  重庆景点排名第3   \n",
       "26                          磁器口古镇Ciqikou Ancient Town    489  11604  重庆景点排名第3   \n",
       "27                                   解放碑步行街Jiefangbei    581   3831  重庆景点排名第4   \n",
       "28                               皇冠大扶梯Crown Escalator    119    419  重庆景点排名第4   \n",
       "29                                    天鹅湖风景区Swan Lake      1     27  重庆景点排名第4   \n",
       "30  武隆喀斯特旅游区Wulong Tiankeng Land Slot National Geo...      8   1011  重庆景点排名第5   \n",
       "31                              安居古城Anju ancient city      1    163  重庆景点排名第5   \n",
       "32                小寨天坑风景区Xiaozha Sky Hole Scenic Area     15    725  重庆景点排名第6   \n",
       "33               武隆天生三桥Wulong Tiansheng Three Bridges     45   5141  重庆景点排名第6   \n",
       "34                            山城步道Mountain Town Trail     60    436  重庆景点排名第7   \n",
       "35              南山一棵树观景台Nanshan Tree Viewing Platform    128    816  重庆景点排名第8   \n",
       "36                            朝天门广场Chaotianmen Square    221   1332  重庆景点排名第9   \n",
       "\n",
       "      星级  rn  \n",
       "0    92%   1  \n",
       "1   100%   1  \n",
       "2    88%   1  \n",
       "3    00%   1  \n",
       "4    90%   1  \n",
       "5    94%   1  \n",
       "6    90%   1  \n",
       "7    98%   1  \n",
       "8    92%   1  \n",
       "9     0%   1  \n",
       "10   86%   1  \n",
       "11   90%   1  \n",
       "12   88%   1  \n",
       "13   86%   1  \n",
       "14   90%   1  \n",
       "15   90%   2  \n",
       "16   72%   2  \n",
       "17   96%   2  \n",
       "18   88%   2  \n",
       "19   86%   2  \n",
       "20   92%   2  \n",
       "21   88%   2  \n",
       "22   92%   2  \n",
       "23   94%   2  \n",
       "24    0%   3  \n",
       "25  100%   3  \n",
       "26   86%   3  \n",
       "27   88%   4  \n",
       "28   80%   4  \n",
       "29  100%   4  \n",
       "30   94%   5  \n",
       "31   80%   5  \n",
       "32   92%   6  \n",
       "33   92%   6  \n",
       "34   90%   7  \n",
       "35   88%   8  \n",
       "36   84%   9  "
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['景点排名'].replace('',np.nan,inplace=True)\n",
    "df.dropna(subset=['景点排名'], inplace=True)\n",
    "df['rn']=df['景点排名'].apply(lambda x:int(re.sub(\"\\D\",\"\",x)))\n",
    "dat=df.sort_values('rn')\n",
    "db=dat[dat['rn']<10]\n",
    "db.reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "db3f3763",
   "metadata": {},
   "outputs": [],
   "source": [
    "fen=[db.iloc[i]['景点名称']for i in range(db.shape[0])]\n",
    "lng=[db.iloc[i]['lng'] for i in range(db.shape[0])]\n",
    "lat=[db.iloc[i]['lat'] for i in range(db.shape[0])]\n",
    "value=[db.iloc[i]['点评数量'] for i in range(db.shape[0])]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "4eae7046",
   "metadata": {},
   "outputs": [],
   "source": [
    "def chongqingsandian():\n",
    "    def geo_add_custom_coordinate():\n",
    "        geo = Geo(init_opts=opts.InitOpts(theme='light',\n",
    "                                      width='1000px',\n",
    "                                      height='600px',\n",
    "                                      bg_color = '#EEEEE8'))\n",
    "        for i in range(len(db)):\n",
    "                geo.add_coordinate(fen[i], lng[i],lat[i])\n",
    "                geo.add_schema(maptype=\"重庆\")\n",
    "                # 为自定义的点添加属性\n",
    "                geo.add(\"\",[(fen[i], value[i])],type_='effectScatter')#type_='heatmap' 热力图 #type_='effectScatter' 涟漪散点图\n",
    "                geo.set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "                geo.set_global_opts(title_opts=opts.TitleOpts(title=\"重庆旅游景点涟漪散点图\"),visualmap_opts=opts.VisualMapOpts())\n",
    "        return geo\n",
    "    chart = geo_add_custom_coordinate()\n",
    "    chart.render_notebook()\n",
    "    c=chart.render_notebook()\n",
    "    return c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "f8b128eb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '重庆':'https://assets.pyecharts.org/assets/maps/chongqing'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"0c4412fdd34a44ec808cfcfca3d5d7be\" style=\"width:1000px; height:600px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '重庆'], function(echarts) {\n",
       "                var chart_0c4412fdd34a44ec808cfcfca3d5d7be = echarts.init(\n",
       "                    document.getElementById('0c4412fdd34a44ec808cfcfca3d5d7be'), 'light', {renderer: 'canvas'});\n",
       "                var option_0c4412fdd34a44ec808cfcfca3d5d7be = {\n",
       "    \"backgroundColor\": \"#EEEEE8\",\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6d2a\\u5d16\\u6d1e\\u6c11\\u4fd7\\u98ce\\u8c8c\\u533aHongyadong Commercial Street\",\n",
       "                    \"value\": [\n",
       "                        \"106.584807\",\n",
       "                        \"29.568126\",\n",
       "                        \"7180\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u9675\\u5c71\\u56fd\\u5bb6\\u68ee\\u6797\\u516c\\u56edWuling Mountain National Forest Park\",\n",
       "                    \"value\": [\n",
       "                        \"107.6000922001\",\n",
       "                        \"29.5441710042\",\n",
       "                        \"58\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6d9e\\u6ee9\\u53e4\\u9547Laitan Ancient Town\",\n",
       "                    \"value\": [\n",
       "                        \"106.500954\",\n",
       "                        \"30.17977\",\n",
       "                        \"90\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\uff08\\u91cd\\u5e86\\u9ec4\\u6c34\\u65c5\\u6e38\\u5ea6\\u5047\\u533a\\uff09\\u6bd5\\u5179\\u5361\\u7eff\\u5babBizika Lvgong\",\n",
       "                    \"value\": [\n",
       "                        \"108.397462\",\n",
       "                        \"30.243973\",\n",
       "                        \"19\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u9633\\u9f99\\u7f38\\u56fd\\u5bb6\\u5730\\u8d28\\u516c\\u56edYunyang Longgang National Geological Park\",\n",
       "                    \"value\": [\n",
       "                        \"109.017312\",\n",
       "                        \"30.683128\",\n",
       "                        \"657\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9149\\u9633\\u6843\\u82b1\\u6e90Youyang Peach Blossom Spring\",\n",
       "                    \"value\": [\n",
       "                        \"108.7566611006\",\n",
       "                        \"28.8574016351\",\n",
       "                        \"853\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u795e\\u5973\\u5cf0The Goddess (Shennv) Peak\",\n",
       "                    \"value\": [\n",
       "                        \"110.021384\",\n",
       "                        \"31.039182\",\n",
       "                        \"106\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e07\\u5dde\\u5927\\u7011\\u5e03Wanzhou Greatfalls\",\n",
       "                    \"value\": [\n",
       "                        \"108.263256\",\n",
       "                        \"30.663286\",\n",
       "                        \"1893\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u77bf\\u5858\\u5ce1Qutang Gorge\",\n",
       "                    \"value\": [\n",
       "                        \"109.585086\",\n",
       "                        \"31.047313\",\n",
       "                        \"195\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9ece\\u9999\\u6e56\\u6e7f\\u5730\\u751f\\u6001\\u56edThe Lixiang Lake Wetland Ecological Park\",\n",
       "                    \"value\": [\n",
       "                        \"106.981023\",\n",
       "                        \"29.326048\",\n",
       "                        \"14\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u963f\\u4f9d\\u6cb3\\u666f\\u533aAyi River\",\n",
       "                    \"value\": [\n",
       "                        \"108.12709\",\n",
       "                        \"29.15722\",\n",
       "                        \"226\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\\u597d\\u5403\\u8857Chongqing Haochi Street\",\n",
       "                    \"value\": [\n",
       "                        \"106.583222\",\n",
       "                        \"29.564388\",\n",
       "                        \"519\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u5bff\\u6e56Changshou Lake\",\n",
       "                    \"value\": [\n",
       "                        \"107.2479380391\",\n",
       "                        \"29.9196049433\",\n",
       "                        \"198\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6c5f\\u7d22\\u9053Yangtze River Cableway\",\n",
       "                    \"value\": [\n",
       "                        \"106.589285\",\n",
       "                        \"29.563863\",\n",
       "                        \"3708\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u9686\",\n",
       "                    \"value\": [\n",
       "                        \"107.759931\",\n",
       "                        \"29.325422\",\n",
       "                        \"5076\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9493\\u9c7c\\u57ceDiaoyu Castle\",\n",
       "                    \"value\": [\n",
       "                        \"106.322661\",\n",
       "                        \"30.011052\",\n",
       "                        \"243\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e30\\u90fd\\u9b3c\\u57ce\\u540d\\u5c71\\u666f\\u533aFengdu Ghost City\",\n",
       "                    \"value\": [\n",
       "                        \"107.732401\",\n",
       "                        \"29.892005\",\n",
       "                        \"484\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5f20\\u98de\\u5e99Zhang Fei Temple\",\n",
       "                    \"value\": [\n",
       "                        \"108.711905\",\n",
       "                        \"30.916655\",\n",
       "                        \"285\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u91d1\\u4f5b\\u5c71Jinfo Mountain\",\n",
       "                    \"value\": [\n",
       "                        \"107.1339128485\",\n",
       "                        \"29.0552056865\",\n",
       "                        \"520\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u5bff\\u53e4\\u9547Changshou Ancient Town\",\n",
       "                    \"value\": [\n",
       "                        \"107.072768\",\n",
       "                        \"29.863712\",\n",
       "                        \"214\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9f9a\\u6ee9\\u666f\\u533aGongtan Ancient Town\",\n",
       "                    \"value\": [\n",
       "                        \"108.358152\",\n",
       "                        \"28.925779\",\n",
       "                        \"420\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5deb\\u5c71\\u5c0f\\u4e09\\u5ce1Wushan Little Three Gorges\",\n",
       "                    \"value\": [\n",
       "                        \"109.894762\",\n",
       "                        \"31.086327\",\n",
       "                        \"468\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u767d\\u5e1d\\u57ce\\u666f\\u533aBaidi City Scenic Area\",\n",
       "                    \"value\": [\n",
       "                        \"109.581821\",\n",
       "                        \"31.047242\",\n",
       "                        \"620\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4ed9\\u5973\\u5c71\\u56fd\\u5bb6\\u68ee\\u6797\\u516c\\u56edFairy Mountain National Forest Park\",\n",
       "                    \"value\": [\n",
       "                        \"107.745381\",\n",
       "                        \"29.503326\",\n",
       "                        \"1367\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u4e09\\u5ce1\\u4e91\\u5dc5\\u795e\\u5973\\u5929\\u8def\\u666f\\u533aSanxia Yundianshen Nv Tianlu Sceneic Area\",\n",
       "                    \"value\": [\n",
       "                        \"109.927152\",\n",
       "                        \"31.021011\",\n",
       "                        \"4\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9f99\\u810a\\u77f3Longji Stone\",\n",
       "                    \"value\": [\n",
       "                        \"108.905025632\",\n",
       "                        \"30.9586486816\",\n",
       "                        \"8\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u78c1\\u5668\\u53e3\\u53e4\\u9547Ciqikou Ancient Town\",\n",
       "                    \"value\": [\n",
       "                        \"106.456424\",\n",
       "                        \"29.587707\",\n",
       "                        \"11604\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u89e3\\u653e\\u7891\\u6b65\\u884c\\u8857Jiefangbei\",\n",
       "                    \"value\": [\n",
       "                        \"106.583623\",\n",
       "                        \"29.563503\",\n",
       "                        \"3831\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u7687\\u51a0\\u5927\\u6276\\u68afCrown Escalator\",\n",
       "                    \"value\": [\n",
       "                        \"106.555938\",\n",
       "                        \"29.558319\",\n",
       "                        \"419\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u9e45\\u6e56\\u98ce\\u666f\\u533aSwan Lake\",\n",
       "                    \"value\": [\n",
       "                        \"109.4678755735\",\n",
       "                        \"31.058933981\",\n",
       "                        \"27\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u9686\\u5580\\u65af\\u7279\\u65c5\\u6e38\\u533aWulong Tiankeng Land Slot National Geological Park\",\n",
       "                    \"value\": [\n",
       "                        \"107.809706313\",\n",
       "                        \"29.4351390166\",\n",
       "                        \"1011\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5c45\\u53e4\\u57ceAnju ancient city\",\n",
       "                    \"value\": [\n",
       "                        \"106.035503\",\n",
       "                        \"29.994082\",\n",
       "                        \"163\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5c0f\\u5be8\\u5929\\u5751\\u98ce\\u666f\\u533aXiaozha Sky Hole Scenic Area\",\n",
       "                    \"value\": [\n",
       "                        \"109.482004\",\n",
       "                        \"30.750759\",\n",
       "                        \"725\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u9686\\u5929\\u751f\\u4e09\\u6865Wulong Tiansheng Three Bridges\",\n",
       "                    \"value\": [\n",
       "                        \"107.811703\",\n",
       "                        \"29.439361\",\n",
       "                        \"5141\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u57ce\\u6b65\\u9053Mountain Town Trail\",\n",
       "                    \"value\": [\n",
       "                        \"106.575293\",\n",
       "                        \"29.556344\",\n",
       "                        \"436\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u5c71\\u4e00\\u68f5\\u6811\\u89c2\\u666f\\u53f0Nanshan Tree Viewing Platform\",\n",
       "                    \"value\": [\n",
       "                        \"106.609884\",\n",
       "                        \"29.551615\",\n",
       "                        \"816\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"effectScatter\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"showEffectOn\": \"render\",\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u671d\\u5929\\u95e8\\u5e7f\\u573aChaotianmen Square\",\n",
       "                    \"value\": [\n",
       "                        \"106.594506\",\n",
       "                        \"29.573221\",\n",
       "                        \"1332\"\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\",\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u91cd\\u5e86\\u65c5\\u6e38\\u666f\\u70b9\\u6d9f\\u6f2a\\u6563\\u70b9\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"\\u91cd\\u5e86\",\n",
       "        \"roam\": true,\n",
       "        \"aspectScale\": 0.75,\n",
       "        \"nameProperty\": \"name\",\n",
       "        \"selectedMode\": false,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_0c4412fdd34a44ec808cfcfca3d5d7be.setOption(option_0c4412fdd34a44ec808cfcfca3d5d7be);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x14b6fad8>"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chongqingsandian()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "97acbbbe",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
